Skip to content
ZeroKit

Cron day-of-week OR rule

In POSIX cron, when both day-of-month and day-of-week are restricted, the job runs when either matches — they are ORed, not ANDed.

So 0 0 1 * MON runs on every Monday and on every first of the month, not only on months that begin on a Monday. This single rule explains most 'the job ran at the wrong time' reports.

The usual workaround is to leave one of the two fields as * and put the extra condition inside the job.

Schedulers add their own deviations: some use six fields with seconds, some support @daily macros, some interpret 0 and 7 as Sunday differently. Always check the platform's cron dialect.

Apply it: Cron Parser

Parse cron expressions into plain English and see the next five run times in your local timezone. Supports 5-field and 6-field cron with ranges and steps.

Open the free Cron Parser →
  • Cron expression — A cron expression is a five-field pattern (minute, hour, day of month, month, day of week)…