Sunday, 00:10 cron job?
OK, I want to set up a cron job to run at 00:10am on Sunday.
I understand I need
"Minute" = 10
"Hour"= 0
"Month"= *
"Weekday" = 0
But what do I put in "Day"? None of the choices there correspond to what I want. If at the top in "Common Settings" I select "Once Per Week", it enters "Every Day" in the "Day" slot. Makes no sense.
-
The "Weekday" setting should be under "Day", and not a separate parameter. (I tried to edit that in to my original post, but the forum refused to accept that edit.) 0 -
It is a bit strange but you would use * (Every Day) 49827 This will give you a 10 0 * * 0 /cron/command that should run eg: [LIST] - 2017-12-10 00:10:00
- 2017-12-17 00:10:00
- 2017-12-24 00:10:00
- 2017-12-31 00:10:00
- 2018-01-07 00:10:00
- etc etc
0 -
It is a bit strange but you would use * (Every Day) 49827 This will give you a 10 0 * * 0 /cron/command that should run eg: [LIST]
- 2017-12-10 00:10:00
- 2017-12-17 00:10:00
- 2017-12-24 00:10:00
- 2017-12-31 00:10:00
- 2018-01-07 00:10:00
- etc etc
0 -
Thank you. Yes, that's what you get when you select for "Common Settings" --"Once Per Week". You get an implicit selection of "Every Day". I'd call that more than a bit strange. The "Weekday" selection ought to be covered under the "Day" selection. Otherwise, you end up with parameter selections that are simply contradictory. But I'll do what works. 0 -
Hello, The "Common Settings" in "cPanel >> Cron Jobs" are setup to support how the crond service works on the OS. How to run crontab job every week on Sunday Essentially, since crond has no weekly setting, it gives you the setting to use for "Every Sunday". Thank you. 0 -
Yes, that is understood. But when I select "Every Sunday" it also selects "Every Day". 0 -
Yes, that is understood. But when I select "Every Sunday" it also selects "Every Day".
Yes, that's by design due to how crond works. It won't actually run every day, but rather "Every Day" on "Sundays" during the month. Thank you.0
Please sign in to leave a comment.
Comments
7 comments