Dan Lester

Active Member
Dec 7, 2017
36
1
8
Austin TX
cPanel Access Level
Website Owner
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.
 

Dan Lester

Active Member
Dec 7, 2017
36
1
8
Austin TX
cPanel Access Level
Website Owner
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.)
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
457
113
UK
cPanel Access Level
Root Administrator
It is a bit strange but you would use * (Every Day)

cron.jpeg

This will give you a 10 0 * * 0 /cron/command that should run eg:

  • 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
 
Last edited:

Dan Lester

Active Member
Dec 7, 2017
36
1
8
Austin TX
cPanel Access Level
Website Owner
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
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.