Crontab Formatting - every 15 minutes

拥有回忆 提交于 2019-11-27 13:56:15

Crontab doesn't remember what time you "started" (presumably the time you executed the crontab -e or crontab filename command).

If you want to run the job every 15 minutes starting from an arbitrary time, you'll have to specify that time. This:

7-59/15 * * * * command

will run at 7, 22, 37, and 52 minutes after each hour. That's assuming you're running Vixie cron, which is the most common implementation. For better portability, you can use:

7,22,37,52 * * * * command

And remember that you can't have spaces within any of the first 5 fields; 0, 15,30,45, as you had in your question, is invalid.

You would format the crontab like this to get it to run every 15 minutes.

*/15 * * * * [path/to/script]

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