Tutorial

Run a cron job on weekdays.

0 9 * * 1-5 fires at 9:00 AM, Monday through Friday. The 1-5 in the day-of-week field is the range of weekdays: 1 (Monday) through 5 (Friday).

The expression

0 9 * * 1-5 /path/to/your/script.sh

Day-of-week numbers

NumberDay
0 (or 7)Sunday
1Monday
2Tuesday
3Wednesday
4Thursday
5Friday
6Saturday

So 1-5 = Monday through Friday = weekdays.

Variations

ExpressionMeaning
0 9 * * 1-5Weekdays at 9 AM
0 9 * * MON-FRISame, using day names
0 9 * * 1,2,3,4,5Same, explicit list
0 9 * * 1,3,5Mon, Wed, Fri at 9 AM
0 9 * * 0,6Weekends at 9 AM (Sun, Sat)
0 9 * * 1-4Mon-Thu at 9 AM (excludes Friday)

Quartz / AWS gotcha

If you're using Quartz or AWS EventBridge, the day-of-week numbers are offset by one: 1=Sunday, 2=Monday, …, 7=Saturday. So weekdays become 2-6, not 1-5. Use the named version (MON-FRI) to avoid confusion.

# AWS EventBridge
cron(0 9 ? * MON-FRI *)

# Quartz
0 0 9 ? * MON-FRI

Examples by platform

Linux crontab

0 9 * * 1-5 /usr/local/bin/send-daily-report.sh

GitHub Actions

on:
  schedule:
    - cron: '0 9 * * 1-5'   # Note: UTC timezone

Kubernetes CronJob

spec:
  schedule: "0 9 * * 1-5"

Jenkins (Build periodically)

H 9 * * 1-5

H picks one fixed minute inside the 9 AM hour for this job, so dozens of jobs scheduled "at 9" don't all start together. See Jenkins cron syntax.

systemd timer

[Timer]
OnCalendar=Mon..Fri *-*-* 09:00:00
Persistent=true

Persistent=true runs a weekday job that was missed while the machine was off as soon as it is back, which plain cron never does. The cron to systemd converter turns any cron line into a timer.

Spring @Scheduled

@Scheduled(cron = "0 0 9 * * MON-FRI", zone = "Europe/London")

Spring uses six fields, with seconds first, and accepts day names. See Spring cron syntax.

Laravel

Schedule::command('report:send')->weekdays()->dailyAt('09:00');

Weekdays in your own timezone

Many schedulers read the expression in UTC, not in your local time. GitHub Actions is always UTC. AWS EventBridge rules are UTC, while EventBridge Scheduler lets you set a timezone. A Kubernetes CronJob can set one directly (v1.27 and later):

spec:
  schedule: "0 9 * * 1-5"
  timeZone: "Asia/Kolkata"

When you convert to UTC yourself, check whether the time crosses midnight. 8 AM Monday in Sydney (UTC+11 in summer) is 9 PM Sunday in UTC, so the weekday range moves back a day: 0 21 * * 0-4. Daylight saving changes the offset again; the DST checker shows the effect.

Common mistakes

Don't combine day-of-month and day-of-week. Unix cron treats both fields as OR, not AND. So 0 9 15 * 1-5 fires on the 15th of every month AND every weekday at 9 AM, not "the 15th if it's a weekday." To get the AND behavior, gate inside your script:

0 9 15 * * [ $(date +\%u) -le 5 ] && /path/to/script.sh

Skipping public holidays

Cron has no holiday calendar: 1-5 fires on every Monday to Friday, holiday or not. The usual fix is a file of dates that the command checks first:

0 9 * * 1-5 grep -qx "$(date +\%F)" /etc/cron-holidays.txt || /path/to/script.sh

/etc/cron-holidays.txt holds one date per line, such as 2026-12-25. The % is written as \% because crontab treats an unescaped % as a newline.

Quartz has this built in: a HolidayCalendar stores a list of excluded days, and a trigger set up with modifiedByCalendar("holidays") skips them.