Ask Your Question

crontab setting weekdays

asked 2016-01-06 17:45:44 -0500

johntest gravatar image

I want to run a cron Wednesday to Monday and have the following setting

weekday => '3-1'

But puppet is complaining about the '-'. What is the correct way to do this?


edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2016-01-06 20:03:01 -0500

johntest gravatar image

updated 2016-01-06 20:04:02 -0500

Resolved it as such.

weekday => [ '3-7' ],

The documentation needs some work.

edit flag offensive delete link more

answered 2016-01-06 18:25:38 -0500

GregLarkin gravatar image

That's not actually a Puppet error message. Puppet simply passes the desired parameters down to the cron system on your machine. I expect that if you use "crontab -e" and try to enter the same range for the weekday, it will not allow you to do that. That's what happened when I tried it on a CentOS 6 machine here.

So you'll need to come up with an alternate value to your weekday attribute that the underlying cron system accepts. Once you do that, it should work fine.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-01-06 17:45:44 -0500

Seen: 59 times

Last updated: Jan 06 '16