Puppet: cron schedule - error "invalid hour"
I need to schedule a cron job to run every 30 minutes from 0 to 6 and 13 to 23 every day. I tried this code:
cron { "MyJob":
ensure => present,
command => "my-cron-command",
user => 'root',
hour => "0-6,13-23",
minute => '*/30',
environment => "MY_ENV"
}
This doesn't work with
0-6,13-23 is not a valid hour
What format hour
should you use? Are there any other changes needed to the cron suggestion?
+3
source to share
3 answers