Skip to main content

Cron every 5 minutes from 1:00 PM through 5:45 PM

Question

Is it possible to use cron to accomplish the following particular use case? I desire for the scheduler to trigger every five minutes from a specific start time, such as 1:00 PM to 5:45 PM.

Answer

Use two cron entries to run every five minutes from 1:00 PM through 5:45 PM. The first covers four complete hours, from 13:00 through 16:55. The second covers the partial final hour, from 17:00 through 17:45. You need the split because one minute field applies to every hour selected in the same expression; a single standard cron entry cannot use all minutes for some hours and stop at minute 45 for another.

crontab
# every 5 minutes from 1:00 PM through 4:55 PM
*/5 13-16 * * *
crontab
# every 5 minutes from 5:00 PM through 5:45 PM
0-45/5 17 * * *

Read each five-field expression as minute, hour, day of month, month, and day of week. In */5 13-16 * * *, */5 selects every fifth minute starting at 0, while 13-16 selects hours 13, 14, 15, and 16. In 0-45/5 17 * * *, the minute range starts at 0, ends at 45, and advances in steps of 5; hour 17 limits that pattern to the 5:00 PM hour. The three trailing wildcards in both entries mean every day of the month, every month, and every day of the week. Together, the entries run continuously at five-minute intervals and include the final 17:45 run.

Run */5 13-16 * * * on Crontap
Why this matters

A single minute pattern applies identically to every selected hour. Using */5 13-17 * * * would continue through 17:55, causing two unwanted runs after your 5:45 PM cutoff. Using 0-45/5 13-17 * * * would avoid those late runs but would also omit :50 and :55 during every earlier hour. Splitting the complete hours from the partial final hour preserves both boundaries and prevents accidental runs outside the requested window. For the unrestricted version, see cron every 5 minutes.

Read the dedicated guide: Cron every 5 minutes.

Cron schedules used

What it does

*/5 13-16 * * * — command

Every 5 minutes, between 13:00 and 16:59, every day.

0-45/5 17 * * * — command

Every 5 minutes, minutes 0 through 45 past the hour, between 17:00 and 17:59, 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/cron-job-expression-every-number-of-minutes-in-a-specific-time-range