Skip to the content

Cron Expression for Every Weekday

0 9 * * 1-5 runs a job at 09:00 from Monday to Friday. Change the hour below, and see why the day-of-month field has to stay a star.

At 09:00 on Monday to Friday

FieldValueMatches
Minute00
Hour99
Day of month*every day of the month
Month*every month
Day of week1-5Monday to Friday

Next 10 runs

    Cron goes by the clock of the machine it runs on. These are the runs on a machine in your time zone.

    Share this tool:TwitterFacebookLinkedInWhatsAppEmail

    Monday to Friday

    In 0 9 * * 1-5 the last field does the work: 1-5 is Monday to Friday. The names say the same, MON-FRI, and are harder to get wrong. The 9 is the hour, so this runs at 09:00. For another time, change the first two fields.

    ExpressionRuns
    0 9 * * 1-5At 09:00 on Monday to Friday
    0 9 * * MON-FRIAt 09:00 on Monday to Friday
    0 9,17 * * 1-5At 09:00 and 17:00 on Monday to Friday
    0 9-17 * * 1-5Every hour from 09:00 to 17:00 on Monday to Friday
    0 9 * * 6,0At 09:00 on Saturday and Sunday
    0 9 1 * 1-5At 09:00 on the 1st of the month and on Monday to Friday

    Leave the third field alone

    It is tempting to combine the weekdays with a date, as in the last row of the table: "at 09:00 on the 1st, if that is a working day". Cron reads it the other way. When day of month and day of week are both filled in, a match on either one is enough, so 0 9 1 * 1-5 runs on every weekday and also on the 1st when that is a Saturday.

    What cron doesn't know

    Public holidays. The job runs on Christmas Day if that is a Tuesday. If that matters, the script has to check the date itself.

    Where the working week runs from Sunday to Thursday, the range is 0-4. In a crontab 0 is Sunday and 1 is Monday. Quartz counts differently, there 1 is Sunday, so use the names when an expression has to work in both.

    The cron expression explainer has the full syntax: the five fields, lists, ranges and steps, and how day of month and day of week work together.

    See all 12