Cron every weekday
0 9 * * 1-5 — 1-5 in the day-of-week field is Monday through Friday in Linux cron. This page uses 09:00; change the first two fields for another time.
Runs
Try one
The same schedule in every dialect
| Where | Expression | |
|---|---|---|
| Linux / Unix crontab, Kubernetes, GitHub Actions | 0 9 * * 1-5 | explain |
| Quartz Scheduler | 0 0 9 ? * MON-FRI | explain |
| AWS EventBridge | cron(0 9 ? * MON-FRI *) | explain |
Spring @Scheduled | 0 0 9 * * MON-FRI | explain |
| Jenkins | 0 9 * * 1-5 | H calculator |
systemd timer OnCalendar= | Mon..Fri *-*-* 09:00:00 | test |
Things to know
- Quartz, AWS EventBridge and Cloudflare Workers number the week from 1 = Sunday, so the same
1-5there means Sunday to Thursday. WriteMON-FRIand the question disappears. - Quartz and AWS also require
?in the day-of-month field when you set the day of week. - Weekdays at a local time on a UTC scheduler shift by an hour at each DST change. GitHub Actions now accepts a
timezone:key; see the GitHub Actions schedule tool.
Variations
| Expression | Runs |
|---|---|
| */15 9-17 * * 1-5 | every 15 minutes during office hours on weekdays |
| 0 9 * * MON-FRI | the same schedule, with names |
| 30 17 * * 1-5 | weekdays at 17:30 |
How to use this schedule
- Open your crontab with
crontab -e(or the scheduler's config file). - Add a line with the expression followed by the command:
0 9 * * 1-5 /usr/local/bin/job.sh. Use absolute paths — cron runs with a minimalPATH. - Save. cron picks the change up automatically; check the next run times above, in the time zone your server uses.
- Redirect output if you want to keep it: append
>> /var/log/job.log 2>&1. The crontab line builder assembles the whole line.
FAQ
Is "0 9 * * 1-5" the same on every server?
The five-field form means the same thing in Linux cron, Kubernetes, GitHub Actions and most libraries. The clock it follows differs:
a Linux server uses its own time zone (or CRON_TZ on cronie), GitHub Actions and AWS EventBridge rules use UTC unless a time zone is configured, and Kubernetes uses the controller's zone unless .spec.timeZone is set.
Why do Quartz and AWS need a "?"
Both require exactly one of day-of-month and day-of-week to be ?, meaning "no specific value"; they refuse an expression that restricts both, or leaves both as *.
How do I check it will run when I expect?
The widget above lists the next runs in the time zone you choose, and flags any run that lands in a daylight-saving gap or a repeated hour. For a whole crontab, paste it into the crontab viewer.