Schedule a cron job ev X minutes, but exclude it from certain hours in the morning?
7,961
Yes it is.
0,20,40 0,5-23 * * * /job/to/run
Author by
sarath
Updated on September 17, 2022Comments
-
sarath over 1 year
Is it possible to make a cron job run say, every 20 minutes, but make it not run for say, 1-4 in the morning.
-
Ignacio Vazquez-Abrams about 14 yearsMight want
0,4-23
there depending on whether you want it to not happen until the end of 4 or at the beginning. -
DaveParillo about 14 yearsMight want to add 'refer to the man page`: ss64.com/bash/crontab.html