Cron Expression for Every Weekday (Monday to Friday)
The cron expression for every weekday is 0 0 * * 1-5, which runs at 00:00 Monday through Friday and skips Saturday and Sunday. For a start-of-business run, change the hour: 0 9 * * 1-5 runs at 9am on weekdays.
At 12:00am on Monday, Tuesday, Wednesday, Thursday and Friday.
0 0 * * 1-5Standard 5-field crontab syntax. Day of month and day of week are OR'd when both are set.
What it does
The fifth field is the day of week, numbered from 0 for Sunday to 6 for Saturday. The range 1-5 therefore covers Monday (1) through Friday (5). Cron checks it together with the time, so the job runs at midnight only on those five days — around 260 times a year.
Weekday-only schedules are for work that tracks business activity: a morning report for the team, syncing timesheets, posting a stand-up reminder to chat, sending invoices, or scaling a staging environment up in the morning and down at night. Skipping weekends saves compute and keeps notifications out of people's days off.
Midnight on a weekday is the start of that day, so 0 0 * * 1-5 includes Monday 00:00 (the end of Sunday night) but not Saturday 00:00 (the end of Friday night). If a job should process each working day after it ends, shift the range: 0 1 * * 2-6 runs at 01:00 Tuesday through Saturday, covering Monday through Friday.
How 0 0 * * 1-5 works, field by field
| FIELD | VALUE | MEANING |
|---|---|---|
| Minute | 0 | minute 0 |
| Hour | 0 | hour 0 (midnight) |
| Day of month | * | every day of the month |
| Month | * | every month |
| Day of week | 1-5 | Monday, Tuesday, Wednesday, Thursday and Friday |
Put together, cron reads 0 0 * * 1-5 as: “At 12:00am on Monday, Tuesday, Wednesday, Thursday and Friday.”
To see further ahead, paste the expression into the cron calculator, which lists the next ten run times and counts how many times the schedule runs in a year.
Frequently asked questions
Does 1-5 in cron mean Monday to Friday?
Yes. In the day of week field 0 is Sunday, 1 is Monday and so on up to 6 for Saturday, so 1-5 is Monday to Friday. Many crons also accept MON-FRI, but support for name ranges varies, so numbers are the safest choice.
Can cron skip public holidays?
No — cron has no calendar of holidays. Keep the weekday schedule and have the script exit early when today is a holiday, for example by checking the date against a list in a file before doing any work.
How do I run a job every 30 minutes on weekdays during office hours?
Combine the fields: */30 9-17 * * 1-5 runs at :00 and :30 from 9:00 to 17:30, Monday to Friday.