crontab run every 15 minutes between certain hours

余生颓废 提交于 2019-11-29 01:48:26

问题


Is this correct scheduled to run between 07:00 and 19:00 at every 15 minutes?

*/15    07-19        *     * *     /path/script

回答1:


Yes! Well, more or less

This will run from 7.00 until 19.45, every 15 minutes:

*/15    07-19        *     * *     /path/script

If you want it to run until 19.00 then you have to write two lines:

*/15    07-18        *     * *     /path/script
0          19        *     * *     /path/script

You can have a full description of the command in crontab.guru: https://crontab.guru/#/15_7-19___




回答2:


Yes, that's correct.

The entry in crontab would should be:

*/15 7-19 * * * /path/script >/dev/null 2>&1


来源:https://stackoverflow.com/questions/41743720/crontab-run-every-15-minutes-between-certain-hours

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