The expression
0 9 * * 1-5
Runs once a day at 09:00, Monday through Friday: five times a week, never on Saturday or Sunday.
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 |
at minute 0 |
| Hour | 9 |
at 9 in the morning |
| Day of month | * |
any day |
| Month | * |
every month |
| Day of week | 1-5 |
Monday (1) to Friday (5) |
Day of week counts from Sunday: 0 and 7 are both Sunday, 1 is Monday, 6 is Saturday. Most implementations also accept names, so 0 9 * * MON-FRI is the same schedule and easier to read. Hours are 24-hour: 9am is 9, 9pm is 21.
Variants
| Schedule | Expression |
|---|---|
| Weekdays at 9:30 | 30 9 * * 1-5 |
| Weekdays at 8am and 5pm | 0 8,17 * * 1-5 |
| Every hour, 9 to 5, on weekdays | 0 9-17 * * 1-5 |
| Weekdays at midnight | 0 0 * * 1-5 |
| Monday to Thursday at 9am | 0 9 * * 1-4 |
| Every day at 9am, weekends included | 0 9 * * * |
Where to write it
- crontab (Linux, macOS):
0 9 * * 1-5 /usr/local/bin/report.shincrontab -e. 9:00 means 9:00 in the server's time zone; on systems that support it, putCRON_TZ=Europe/Madridat the top of the file to pin it. - GitHub Actions:
on: schedule: - cron: '0 9 * * 1-5'runs at 09:00 UTC. For 9am in New York write0 13 * * 1-5in summer (EDT) or0 14 * * 1-5in winter (EST); there is no way to follow daylight saving automatically. Scheduled runs can also start several minutes late at busy times. - Kubernetes CronJob:
schedule: "0 9 * * 1-5"plustimeZone: "America/New_York", which does follow daylight saving. - AWS EventBridge: six fields, and one of the two day fields must be
?:cron(0 9 ? * MON-FRI *). Use names here, because EventBridge numbers days 1 (Sunday) to 7 (Saturday), so2-6would be Monday to Friday. Classic rules run in UTC; EventBridge Scheduler accepts a time zone.
Common mistakes
- Wrong time zone. The single most common bug: the server or the platform runs in UTC and the report arrives at 10:00 or 4:00 local time. Check with the parser's Local/UTC switch.
9 * * * 1-5is not 9am. That runs at minute 9 of every hour on weekdays, 24 times a day.- Holidays. Cron has no calendar of public holidays. If the job must skip them, have the script check a holiday list and exit early.
- Adding a day of month.
0 9 1 * 1-5doesn't mean "the 1st, if it's a weekday": when both day fields are restricted, cron runs when either matches, so it fires on every weekday and on every 1st.
Paste the expression into the Cron Expression Parser to see the next run times in your time zone.