tooloora

Cron on weekdays at 9 a.m. — 0 9 * * 1-5

Monday through Friday at 09:00 — including how cron numbers the weekdays and why it knows nothing about public holidays.

Runs locally — nothing is uploaded

Examples

In plain words

At 09:00, Monday through Friday.

Field by field

  • 0Minute

    at minute 0

    Matches: 0

  • 9Hour

    between 09:00 and 09:59

    Matches: 9

  • *Day of month

    on every day of the month

    Matches: 1, 2, 3, 4, 5, 6 … 31

  • *Month

    in every month

    Matches: Jan, Feb, Mar, Apr, May, Jun … Dec

  • 1-5Day of week

    Monday through Friday

    Matches: Mon, Tue, Wed, Thu, Fri

Next runs

Calculating the next runs …

These times apply in the time zone configured on the server. Cron converts nothing; this preview uses your device clock.

The expression stays in your browser — it is never sent to a server.

Other expressions

0 9 * * 1-5 runs the job at 09:00 on Monday through Friday and stays quiet at the weekend. The last field holds the weekday range: cron counts Sunday as 0, so 1-5 is Monday to Friday. The day-of-month field stays a star, which keeps the two day fields from interfering.

How does cron number the weekdays?

From Sunday as 0 up to Saturday as 6 — and 7 is accepted as Sunday again, so both 0 and 7 mean the same day. That double meaning exists because different Unix variants disagreed, and it is the reason ranges like 5-7 are legal while 7-1 is an error. The names SUN to SAT and MON-FRI work in every common implementation.

Does cron know about public holidays?

No. There is no holiday calendar anywhere in cron, so a report scheduled for weekdays will also land in an empty office on 3 October or 1 May. The usual fix is a guard inside the script: look the date up in a list of holidays and exit early. Keeping the check in the script rather than the schedule also means one place to update each year.

Why should the day-of-month field stay a star?

Because as soon as both day fields are restricted, cron switches from AND to OR: 0 9 1 * 1-5 does not mean “the 1st, if it is a weekday”, it means “on the 1st and on every weekday”. The manual page crontab(5) states this explicitly, and it is the single most misread rule in the whole syntax.

How to add the expression

  1. Write the weekday range in the fifth field, either as 1-5 or as MON-FRI.
  2. Leave the day-of-month field as a star, otherwise the OR rule kicks in.
  3. Add the line 0 9 * * 1-5 with your command and save the crontab.
  4. If holidays matter, add a date check at the top of the script instead of changing the schedule.

Frequently asked questions

Is 1-5 Monday to Friday or Sunday to Thursday?

Monday to Friday. Counting starts at Sunday with 0, so 1 is Monday and 5 is Friday. If you are unsure, type the expression into the explainer above: it spells the weekdays out by name.

How do I schedule Saturday and Sunday only?

Use 0 9 * * 6,0 or the equivalent 0 9 * * 6,7. Both cover Saturday and Sunday, because cron accepts 7 as a second spelling of Sunday alongside 0.

Can I use MON-FRI instead of 1-5?

Yes, the three-letter names are supported in the weekday and month fields by all common implementations. They cannot be combined with a step in some older versions, so 1-5 remains the safest spelling in unfamiliar environments.

Is the expression I paste here stored?

No. Everything happens in your browser: the line is parsed locally, the description and the next run times are computed on your device, and nothing is sent to a server or written to any log.