MONDay and month names in cron expressions
Most cron dialects accept three-letter names for days and months. Names avoid the numbering differences between systems, so they are the safest way to write weekdays.
The rules
- Days: SUN MON TUE WED THU FRI SAT.
- Months: JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC.
- Names are case-insensitive in Quartz, Spring and EventBridge.
- Ranges of names work: MON-FRI.
Examples you can copy
0 0 9 ? * MON-FRIAt 09:00 UTC, on Mon, Tue, Wed, Thu and Fri. Weekdays at 9, without worrying that Quartz Monday is 2.
First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 09:00 · Mon, 04 Jan 2027, 09:00 · Tue, 05 Jan 2027, 09:00
0 0 9 * * MON-FRIAt 09:00 UTC, on Mon, Tue, Wed, Thu and Fri. Identical meaning in Spring.
First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 09:00 · Mon, 04 Jan 2027, 09:00 · Tue, 05 Jan 2027, 09:00
0 9 * * MON-FRIAt 09:00 UTC, on Mon, Tue, Wed, Thu and Fri. Works in most crontab implementations too.
First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 09:00 · Mon, 04 Jan 2027, 09:00 · Tue, 05 Jan 2027, 09:00
0 0 0 1 JAN,JUL ?At 00:00 UTC, on the 1st of the month, in Jan and Jul. Midnight on 1 January and 1 July.
First runs after 1 Jan 2027 (UTC): Thu, 01 Jul 2027, 00:00 · Sat, 01 Jan 2028, 00:00 · Sat, 01 Jul 2028, 00:00
Common mistakes
- Using names in GitHub Actions without checking. GitHub documents SUN-SAT, but numbers are the safer choice there.
- Mixing numbers and names inside one range (1-FRI).
Frequently asked questions
Which is safer, numbers or names?
Names. The weekday numbering differs across dialects, but MON always means Monday.