In this case, you will need two cron jobs:
# 1st part: every 5 minutes from 1PM to 5PM
*/5 13-16 * * * command
# 2nd part: every 5 minutes from 5PM to 5:45 PM
0-45/5 17 * * * commandThe reason you need two lines: cron applies the step to a single minute range (0-45/5) within a single hour range (17). You can't mix “run every 5 min for the whole hour from 13:00 to 16:59 PLUS only the first 45 min of 17:00” in one cron line — the minute field is a single expression that applies identically to every selected hour.
The pattern 0-45/5 is shorthand for “0, 5, 10, 15, 20, 25, 30, 35, 40, 45” — ten runs in the 17:00 hour. Combined with13-16 at */5, you get 48 runs (12 each in 13, 14, 15, 16) plus 10 in 17 = 58 runs across 4h45m. Verify on the calendar that the boundary at 17:00 lines up the way you expect (it does — both lines run at 17:00 if you use */5 13-17 instead, hence the explicit split).
For more variations on “every N minutes” patterns, see the cron every 5 minutes guide.
Read the dedicated guide: Cron every 5 minutes.
Other answers and worked examples for the most confusing cron expressions.
Ready to schedule it?
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.
Free forever tier ・ No credit card required
Schedule
“every 5 minutes”
Next run
in 23s
Permalink: https://tool.crontap.com/help/cron-job-expression-every-number-of-minutes-in-a-specific-time-range