How to create cron statement to run for multiple hours

后端 未结 2 767
广开言路
广开言路 2020-12-29 02:24

I need a cron statement to run for few hours eg 1-8 then 10-15. In this case will the following statement work,

0 1-8,10-15 * * * 

If not

2条回答
  •  旧时难觅i
    2020-12-29 02:58

    I find it more readable to have two crontab entries:

    0 1-8 * * * ...
    0 10-15 * * * ...
    

提交回复
热议问题