Skip to content
Webmaster Tools
Dev utilitiesCron ParserEvery 5 minutes, business hours

Cron every 5 minutes during business hours

Every 5 minutes during business hours in cron is */5 9-17 * * 1-5: 9:00 to 17:55, Monday to Friday. How to stop at 17:00 sharp, and the GitHub Actions and AWS forms.

Cron expression
*/5 9-17 * * 1-5
See the next run times

The expression

*/5 9-17 * * 1-5

Runs at minute 0, 5, 10 … 55 of every hour from 9:00 to 17:55, Monday through Friday. That's 12 runs an hour for 9 hours (9 through 17), 108 runs a weekday and 540 a week.

Field Value Meaning
Minute */5 every 5th minute, starting at 0
Hour 9-17 hours 9 through 17
Day of month * every day
Month * every month
Day of week 1-5 Monday (1) to Friday (5)

The hour range includes all of 17:00-17:59, so the last run of the day is 17:55, not 17:00. Day-of-week numbering starts with Sunday as 0 (7 also means Sunday), so 1-5 is Monday to Friday; MON-FRI works in most implementations.

Variants

Schedule Expression
Every 5 minutes, 9:00 to 16:55, weekdays */5 9-16 * * 1-5
Same, plus a final run at 17:00 add 0 17 * * 1-5
Every 5 minutes, 8:00 to 18:55, weekdays */5 8-18 * * 1-5
Every 15 minutes during business hours */15 9-17 * * 1-5
Every hour during business hours 0 9-17 * * 1-5
Every 30 minutes on weekdays */30 * * * 1-5
Every 5 minutes, all day */5 * * * *
Every minute, 9 to 5 * 9-16 * * *

Where to write it

  • crontab (Linux, macOS): */5 9-17 * * 1-5 /usr/local/bin/check-tickets.sh in crontab -e. Business hours are the server's time zone; on cronie, CRON_TZ=America/Chicago at the top of the file sets another.
  • GitHub Actions: on: schedule: - cron: '*/5 9-17 * * 1-5' runs on UTC business hours. For New York, 9:00-17:59 is */5 13-21 * * 1-5 in summer (EDT) and */5 14-22 * * 1-5 in winter (EST). Five minutes is GitHub's minimum, and runs can lag under load.
  • Kubernetes CronJob: schedule: "*/5 9-17 * * 1-5" with timeZone: "America/New_York", which handles daylight saving for you.
  • AWS EventBridge: cron(0/5 9-17 ? * MON-FRI *), with ? in day of month; EventBridge counts weekdays from Sunday = 1, so names are safer than numbers. Rules are UTC; EventBridge Scheduler accepts a time zone.

Common mistakes

  • Expecting the last run at 17:00. Use 9-16 plus a separate 0 17 line.
  • */5 9-17 * * * includes weekends.
  • Restricting day of month as well. With both day fields set, cron runs when either matches, not both.
  • Overlap. Use flock -n if a check can take more than 5 minutes.

Paste any expression into the Cron Expression Parser to see it in words and its next run times.