Cron expression generator · every weekday

Cron job every weekday

The crontab line for a job every weekday is 0 9 * * 1-5. It runs 5 times a week, 261 times a year. Edit it below to see the next runs in your time zone.

—

Next runs

    Field by field

    How 0 9 * * 1-5 reads

    The five fields are minute, hour, day of month, month and day of week. A star means every value.

    FieldValueMeaning
    Minute0minute 00
    Hour9hour 09
    Day of month*every day of month
    Month*every month
    Day of week1-5Monday to Friday (1-5)

    For example, from Wednesday 6 January 2027 at 10:07 the next runs are: Thu 7 Jan 2027, 09:00; Fri 8 Jan 2027, 09:00; Mon 11 Jan 2027, 09:00; Tue 12 Jan 2027, 09:00; Wed 13 Jan 2027, 09:00.

    When to use it

    What a job every weekday is for

    Monday to Friday at 09:00 is the schedule for things people use at work: a morning summary email, opening a support queue, or a reminder to approve the day’s orders. Change the hour to fit your day; «0 0 * * 1-5» runs at midnight on weekdays.

    Mistakes

    Common mistakes

    • «1-5» is Monday to Friday. «0-4» would be Sunday to Thursday, which is the working week in some countries.
    • Cron knows nothing about public holidays. A job that must skip them has to check a calendar itself and exit.
    systemd

    The same schedule as a systemd timer

    On systems with systemd, a timer can replace the crontab line: OnCalendar=Mon..Fri *-*-* 09:00:00. Check it with systemd-analyze calendar "Mon..Fri *-*-* 09:00:00", which prints the next run.

    Monitoring

    Know when it didn’t run

    Cron doesn’t tell you when a job stops running. A heartbeat monitor alerts you when the job’s ping is late, but its periods are fixed, from a minute to a week: with a period of 1 day, a job that skips the weekend would look late on Saturday. Pause the monitor for the weekend, or let the job ping on weekends too and do its work only on weekdays.

    What is the cron expression for a job every weekday?

    0 9 * * 1-5. It runs 5 times a week, 261 times a year, on the server’s clock.

    How do I run a job every weekday with systemd instead?

    Create a timer with OnCalendar=Mon..Fri *-*-* 09:00:00 next to a service that runs the job, then enable it with systemctl enable --now name.timer. Persistent=true also runs a run that was missed while the machine was off.