Is it possible to have a cronjob run every 15 minutes (over every hour etc..) except for at 3AM?
I have another special cronjob I want to run at 3AM, but I don't want the other one to run at the same time...
basic 3. /usr/bin/vim. tiny 4. /bin/ed Choose 1-4 [1]: Make a new line at the bottom of this file and insert the following code. Of course, replace our example script with the command or script you wish to execute, but keep the */5 * * * * part as that is what tells cron to execute our job every 5 minutes.
0 * * * * -this means the cron will run always when the minutes are 0 (so hourly) 0 1 * * * - this means the cron will run always at 1 o'clock. * 1 * * * - this means the cron will run each minute when the hour is 1.
With one cron line, no. With three, yes:
# Every 15 minutes except for 3:00-3:59 */15 0-2,4-23 * * * thejob # 3:15, 3:30, 3:45 15-45/15 3 * * * thejob # 3:00 dead 0 3 * * * otherjob
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With