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.shincrontab -e. Business hours are the server's time zone; on cronie,CRON_TZ=America/Chicagoat 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-5in summer (EDT) and*/5 14-22 * * 1-5in winter (EST). Five minutes is GitHub's minimum, and runs can lag under load. - Kubernetes CronJob:
schedule: "*/5 9-17 * * 1-5"withtimeZone: "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-16plus a separate0 17line. */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 -nif 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.