In the crontab job, how can i set run a crontab run on every friday, saturday, and sunday, between 1pm to 8pm , every 2 minute?
Is this the correct way?
0,2,4,6,8...58 13-21 * * 5-7 $HOME/bin/ >2>&1
?
Thanks LOuis
Originally posted by enterume 0,2,4,6,8...58 13-21 5-7 $HOME/bin/ >2>&1
Originally posted by enterume
0,2,4,6,8...58 13-21 5-7 $HOME/bin/ >2>&1
The execution time designation looks good except for the weekdays. They are numebred 0-6 so you want "4-6" instead of "5-7". And I hope the ellipses means you're going to continue the comma delimited numbers for the minutes. That'll certainly make a long entry.
Hank
OOPS!!!
I mean you want "0,5,6" for the weekdays. Sunday is 0, Monday is 1, etc.
Sorry.
You can also use:
*/2
rather than:
0,2,4,6,8...58
in the minutes field to tell it to run every 2 minutes. Looks much cleaner that way 🙂