0 9-17 * * 1-5
At 9 times a day on Monday, Tuesday, Wednesday, Thursday and Friday
Field by Field
| Field | Value | Matches |
|---|---|---|
| Minute | 0 | 0 |
| Hour | 9-17 | 9, 10, 11, 12, 13, 14, 15, 16, 17 |
| Day of month | * | every day |
| Month | * | every month |
| Day of week | 1-5 | 1, 2, 3, 4, 5 |
Ranges in Two Fields at Once
9-17 in the hour field and 1-5 in the day-of-week field intersect: nine runs a day
(09:00 through 17:00 inclusive), Monday through Friday, 45 runs a week.
Ranges in *different* fields intersect. Restricting both day-of-month and day-of-week is the one exception, where cron takes the union instead.
Ends Are Inclusive
9-17 includes 17, so the last run is at 17:00, not 16:00. If the intent is "during the
working day, finishing before people leave", 9-16 is what you want.
Every Half Hour Instead
0,30 9-17 * * 1-5 doubles the frequency inside the same window. Combining a list in the
minute field with a range in the hour field is entirely legal and very common.
Holidays Are Not in Cron
There is no holiday awareness anywhere in cron. A job that must not run on public holidays needs a check in the script against a calendar you maintain — and that calendar is jurisdiction-specific, which is why most teams settle for running anyway and making the job harmless on a quiet day.
Time Zones
Standard crontab evaluates in system local time. Vercel Cron, GitHub Actions, Kubernetes
CronJobs and AWS EventBridge all evaluate in UTC. If converting your local time crosses
midnight, the day-of-week field shifts too — weekdays at 5pm in UTC-07:00 is
0 0 * * 2-6, not 0 0 * * 1-5.
The Day-Field Trap
When both the day-of-month and day-of-week fields are restricted, cron matches either,
not both. 0 0 13 * 5 runs on every 13th *and* every Friday — not Friday the 13th. Leave
one of them as * unless you genuinely want the union.
Other Common Schedules
| Expression | Runs |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
*/15 * * * * | Every 15 minutes |
0 * * * * | Every hour, on the hour |
0 0 * * * | Every day at midnight |
0 9 * * * | Every day at 9am |
0 9 * * 1-5 | Weekdays at 9am |
0 9 * * 1 | Every Monday at 9am |
Making the Job Safe
- Assume double firing. DST transitions, restarts and retries all cause it. Make the job
- Assume overlap. Cron starts the next run whether or not the last one finished. Take a
- Avoid
:00. Every hourly job on the internet fires at the top of the hour; a random
- Log the start and end. A cron job that silently stops running is invisible until