Cron expression for every weekday
0 9 * * 1-5 runs a job at 9:00 from Monday to Friday and skips the weekend.
Runs entirely in your browser. Nothing you paste is sent to our server, stored or logged.
0 9 * * 1-5
When it runs next
What it means
The last field is the day of the week. 0 and 7 both mean Sunday, and 1 to 5 covers Monday to Friday. Most versions of cron also accept names, so 0 9 * * MON-FRI does the same job and is easier to read in a crontab you will open again months from now.
Leave the day of the month as an asterisk. If both day fields are set, cron runs when either one matches, so 0 9 1 * 1-5 would run on every weekday and also on the first of every month, even when that falls on a Sunday.
Common variations
| Expression | Runs |
|---|---|
0 9 * * 6,0 | At 9:00 on Saturday and Sunday |
*/30 9-17 * * 1-5 | Every half hour during office hours on weekdays |
0 18 * * 1-5 | At 18:00 every weekday |
As a crontab line
Add the command you want to run after the five fields, then save it with
crontab -e:
0 9 * * 1-5 /path/to/script.sh