Execute a Cronjob Every Minute Between Two Times

前端 未结 2 1926
名媛妹妹
名媛妹妹 2021-01-28 05:09

I need to run a bash script in crontab every minute between 8:45am and 9:50am of every day.

Code:

45,4         


        
2条回答
  •  梦如初夏
    2021-01-28 05:40

    http://www.nncron.ru/help/EN/working/cron-format.htm

    According to that website, you can do something like this:

    45-59 8 * * * /home/pull.sh > /home/logs/pull.log 2>&1
    

    I'm not certain what you're looking to do with this line:

    00/50 9 * * * /home/pull.sh > home/logs/pull.log 2>&1
    

    I actually don't know what that will do.

提交回复
热议问题