Crontab every 5 minutes [closed]

左心房为你撑大大i 提交于 2019-12-03 14:56:51

问题


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
  1. Write explicit all minutes in crontab
  2. Run sleep command before the actual command


来源:https://stackoverflow.com/questions/11260406/crontab-every-5-minutes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!