cron - Cronjob every x hours between 23-16 not working -
partly using stackoverflow search figured out how run cronjob every 3 hours not between 23h-16h. means pause between 16h today untill 23h today. cronjob should start running every 3 hours @ 23h , stop @ 16h, start again @ 23h.
this result:
0 23-16/3 * * * /usr/local/bin/flexget -c /media/usb/downloads/flexget/config.yml --cron
now question: why not working? not run @ :(
i tried:
* 23-16/3 * * * /usr/local/bin/flexget -c /media/usb/downloads/flexget/config.yml --cron
(not sure difference 0 or * minutes, rounded hours or not?)
this work:
0 */3 * * * /usr/local/bin/flexget -c /media/usb/downloads/flexget/config.yml --cron
but runs every 3 hours every day, without pause between 16-23.
you can list hours explicitly.
0 2,5,8,11,14,23 * * * /usr/local/bin/flexget -c /media/usb/downloads/flexget/config.yml --cron
note not same replacing 0
minutes *
, like:
* 2,5,8,11,14,23 * * * /usr/local/bin/flexget -c /media/usb/downloads/flexget/config.yml --cron
the latter starts on every minute on hours specified, i.e. 2:00, 2:01, 2:02, ..., 2:59, 5:00, 5:01, ... 5:59, ...
Comments
Post a Comment