Cron scheduling: Is the hour argument in 24h format?
No. This would run at the 4th and 16th minute of every hour.
You're looking for:
0 4,16 * * * command
That will run at both 4am and 4pm.
Or if the two commands are different:
0 4 * * * command
0 16 * * * another_command
The first column sets the minutes. In these examples, I'm setting it at 0 so the event happens on the hour.
The in the next column we set the hour you want it to run. We use absolute values but you can use
*/2
for "every other hour", etc.The next column says that we want this to happen every day of the month.
The next column denotes the months that this should trigger on (all in this case).
The last column says which days of the week this is allowed to trigger on. 0-7 (where both 0 and 7 are Sunday).
*
means it can trigger on any day of the week.