Reference

Cron day-of-week numbers.

Unix cron: 0 or 7 = Sunday, 1 = Monday, ... 6 = Saturday. Quartz and AWS EventBridge: 1 = Sunday, 2 = Monday, ... 7 = Saturday. The offset of one is the most common source of "my cron job fires on the wrong day" bugs.

Platform-by-platform

PlatformSunMonTueWedThuFriSat
Unix cron0 or 7123456
Kubernetes CronJob0 or 7123456
GitHub Actions0 or 7123456
Quartz1234567
AWS EventBridge1234567
Spring @Scheduled0 or 7123456
Jenkins0 or 7123456

Two camps: most use Unix-style (0=Sun), but Quartz and AWS use 1=Sun.

Named values — portable across platforms

To avoid the off-by-one confusion entirely, use the three-letter abbreviations:

SUN MON TUE WED THU FRI SAT

These work in every modern cron implementation and aren't off by one. So MON-FRI means weekdays everywhere — no platform-specific quirks.

The most common bug

A developer writes 0 9 * * 1-5 in their AWS EventBridge config, expecting weekdays. But AWS interprets 1 as Sunday — so the job fires Sunday through Thursday instead.

Fix: always use MON-FRI for AWS / Quartz instead of numeric ranges.

Why the difference exists

Unix cron descends from the 1975 V7 Unix cron, where Sunday was day 0 (matching %w in strftime). Quartz was designed in the early 2000s, and chose 1-7 with Sunday=1 to match ISO 8601 day numbers — except ISO 8601 actually says Monday=1, Sunday=7. So Quartz is its own thing.

The lesson: never use raw numbers when there's an alternative.

Weekday and weekend ranges

DaysUnix cronQuartz / AWS
All weekdays (Mon-Fri)1-5 or MON-FRI2-6 or MON-FRI
Weekend (Sat-Sun)0,6 or SAT,SUN1,7 or SAT,SUN
Mon, Wed, Fri1,3,5 or MON,WED,FRI2,4,6 or MON,WED,FRI
Tue, Thu2,4 or TUE,THU3,5 or TUE,THU

Sanity-check your expression

Always paste your final expression into the platform-specific tool (tools page) and verify the "next 5 runs" list shows the days you expect.

Related

Continue reading.