Skip to main content

Cron every 15 minutes except at 3:00 AM

Question

Can I set up a cron job to run every 15 minutes throughout the day, except for 3:00 AM? I have another task that I want to run at 3:00 AM and don't want these two conflicting.

Answer

You need three cron entries to run every 15 minutes while reserving 3:00 AM for another command. The first covers every quarter hour from midnight through 2:45 AM and again from 4:00 AM through 11:45 PM. The second restores the three allowed quarter-hour runs during the 3:00 AM hour: 3:15, 3:30, and 3:45. The third runs your other command at exactly 3:00 AM. Together they produce the intended schedule without an overlap at that minute.

crontab
# every 15 minutes outside the 3:00 AM hour
*/15 0-2,4-23 * * *
crontab
# at 3:15, 3:30, and 3:45 AM
15-45/15 3 * * *
crontab
# every day at 3:00 AM
0 3 * * *

Read each five-field expression as minute, hour, day of month, month, and day of week. In the first entry, */15 selects minutes 0, 15, 30, and 45, while 0-2,4-23 includes every hour except 3. In the second, 15-45/15 selects minutes 15 through 45 in 15-minute steps, and 3 limits those runs to the 3:00 AM hour. In the third, minute 0 and hour 3 select 3:00 AM. The three trailing wildcards mean every day of every month and every day of the week.

Run */15 0-2,4-23 * * * on Crontap
A row of twelve hour boxes, each holding four quarter-hour dots, with the fourth box left empty to mark the hour reserved for the other job.
The reserved hour, isolated: the split entries hand 3:00 to the other job and keep the other quarter-hour runs.
Why this matters

Cron has no exclusion or negation operator, so trying to express “every 15 minutes except 3:00 AM” in one standard five-field entry creates an unwanted double fire: a broad quarter-hour schedule includes 3:00 AM automatically. Splitting the schedule makes the reserved minute explicit and keeps the other quarter-hour runs intact. It also avoids excluding the entire 3:00 AM hour, which would silently remove the valid 3:15, 3:30, and 3:45 runs. Paste all three lines into the multi-cron visualizer to confirm they never share a minute.

Read the dedicated guide: Cron every 15 minutes.

Cron schedules used

What it does

*/15 0-2,4-23 * * * — command

Every 15 minutes, at 00:00 through 02:00 and 04:00 through 23:59, every day.

15-45/15 3 * * * — command

Every 15 minutes, minutes 15 through 45 past the hour, between 03:00 and 03:59, every day.

0 3 * * *

At 03:00, every day.

See this cron expression on the calendar view example

Write the cron here. Run it on Crontap.

Point Crontap at any URL. Pick any cron. Done.

WordPress, Shopify, Railway, Cloud Run, Vercel, HubSpot, Ghost, your own box. If it answers HTTP, Crontap can drive it on a clock you can read, in the timezone that actually matters, and page you when something breaks.

1.9k+ teams · Free forever tier · No credit card

Permalink: https://tool.crontap.com/help/crontab-run-every-minute-except-at-hour