Cron expression for every weekday at 9am

Free

0 9 * * 1-5 - At 09:00, on weekdays (Monday to Friday).

Field by field

0 9 * * 1-5 reads: At 09:00, on weekdays (Monday to Friday).

What each field of 0 9 * * 1-5 selects
FieldValueSelects
Minute00
Hour909:00
Day of month*any day of the month
Month*every month
Day of week1-5Monday, Tuesday, Wednesday, Thursday and Friday

Worth knowing

  • 1-5 is Monday to Friday; 0 and 7 both mean Sunday. MON-FRI works too and is harder to get wrong.
  • Spring, Quartz and AWS number the days differently - the conversions below use names for that reason.
  • Public holidays are not in cron's vocabulary. A job that must skip them has to check a calendar itself.

Variations

The same schedule elsewhere

crontab

0 9 * * 1-5 /path/to/job.sh

Runs in the machine's local timezone. crontab -e to edit.

GitHub Actions

on:
  schedule:
    - cron: "0 9 * * 1-5"

Always UTC. Nothing more often than every 5 minutes, and runs can start late when GitHub is busy.

Kubernetes CronJob

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

timeZone needs Kubernetes 1.27 or later; without it the controller's zone applies, usually UTC.

Spring @Scheduled

@Scheduled(cron = "0 0 9 * * MON-FRI")

Six fields: seconds come first. Days are written as names, which Spring and cron read alike.

Quartz

0 0 9 ? * MON-FRI

One of day-of-month and day-of-week must be ?. Quartz counts days 1-7 from Sunday, so names are safer than numbers.

AWS EventBridge

cron(0 9 ? * MON-FRI *)

Six fields, the last one the year. UTC unless the schedule sets a timezone. Days count from Sunday, as in Quartz.

systemd timer

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

Persistent=true runs a job that was missed while the machine was off, once it is back.