问题
How could i tell crontab to run every 5 minutes, but starting at the second minute of the hour. In other words, i would like to execute my script when minute % 5 = 2
.
For example, my script should run at :
08:02
08:07
08:12
08:17
...
Thanks for your help!
回答1:
There are two possibilities:
2,7,12,17... command
*/5 .... sleep 120 ; command
- Write explicit all minutes in
crontab
- Run
sleep
command before the actual command
来源:https://stackoverflow.com/questions/11260406/crontab-every-5-minutes