PatternCron

Every Sunday at midnight

The weekly maintenance slot: 00:00 every Sunday — plus cron's oldest quirk, the day Sunday gets two numbers.

Last updated

Pattern
0 0 * * 0
Open in Crontab Schedule Creator

In plain English

  • Fires Sundays at 00:00
  • 52 runs per year

Why it’s written this way

Minute 0, hour 0, day-of-week 0: the first moment of Sunday, once a week. Weekly jobs pin day-of-week and leave day-of-month starred — the calendar date of "Sunday" changes every week, so constraining both would misfire.

Sunday is the one day with two spellings: both 0 and 7 mean it, a POSIX-vs-implementations compromise that outlived everyone involved. Most crons also accept SUN.

Edge cases to know

  • Midnight belongs to the SERVER's timezone — for a user-facing weekly digest, midnight UTC is Saturday evening in New York and mid-morning Sunday in Sydney.
  • A range that crosses Sunday (5-0) is invalid in classic cron — spell it 5,6,0 or 0,5,6 instead.

Related in Patterns