Skip to content
Unix cron100% Client-Side

Cron Expression for Weekends at Midnight

0 0 * * 0,6At 12:00 AM, only on Sunday and Saturday

The Unix cron expression "0 0 * * 0,6" runs a task weekends at midnight. Preview the next run times in your timezone, read the plain-English translation, and copy ready-to-paste snippets for crontab, Node.js, GitHub Actions, and AWS EventBridge.

Live playground

  • Min0
  • Hour0
  • DOM*
  • Month*
  • DOW0,6

At 12:00 AM, only on Sunday and Saturday

Unix cron · evaluated in UTC

24-hour view

Hover a highlighted hour for precise timestamps. Showing the next 50 executions.

Upcoming runs

Timezone

Runs are simulated in the selected IANA timezone. Auto-detected from your browser on first load.

Field breakdown

How each field of 0 0 * * 0,6 is interpreted in the Unix cron format.

Field breakdown of 0 0 * * 0,6
FieldValueAllowedStatus
Minute00-59Valid
Hour00-23Valid
Day of Month*1-31Valid
Month*1-12 or JAN-DECValid
Day of Week0,60-7 or SUN-SAT (0 and 7 = SUN)Valid

Use “0 0 * * 0,6” in real code

Copy-paste configurations for the most common schedulers, converted to each platform’s dialect where needed.

import cron from 'node-cron';

cron.schedule('0 0 * * 0,6', () => {
  console.log('Running task...');
});

Running “0 0 * * 0,6” in production

The nobody-is-watching window: weekend midnight maintenance

0 0 * * 0,6 fires at midnight on Saturday and Sunday — the two nights with the least traffic and the least staff attention — and that combination makes it the default window for work too disruptive for weeknights: full backups that lock tables, staging schema migrations, replica rebuilds, report archives that scan entire months, and version upgrades rehearsed on quiet systems before touching production. The day list is 0,6 — Sunday is 0, Saturday is 6 — and order in the list is irrelevant; cron sorts by value, not by writing.

The boundary arithmetic trips people exactly once: Saturday 00:00 is the midnight that begins Saturday, which follows Friday evening — so 'the Friday-night maintenance slot' is written as this recipe, not as a Friday schedule. If the intent is Sunday-night prep for Monday (the other weekend midnight), the same expression covers it, since Sunday 00:00 belongs to Sunday. Both weekend midnights in one line is what makes this recipe efficient: two fires a week, 104 a year, each landing in the quietest hour of its night, with Monday morning arriving before any cumulative effect needs review.

Designing for the quiet window: duration budgets and alerting

The weekend window is long — fifty-four hours between Friday evening and Monday morning — which tempts teams to schedule heavy work at midnight and assume completion. The discipline that keeps it reliable: still budget runtime explicitly (a 'weekend' backup that runs forty hours has consumed the window even if nothing failed), still alert on failure (quiet windows fail quietly; a Saturday-midnight backup that dies should page someone Saturday morning, not surface as missing archives next Friday), and still make jobs resumable (a migration interrupted at 03:00 by an unrelated incident should resume, not restart, when the weekend's remaining hours allow).

The cadence also pairs naturally with its weekday mirror: weekdays-at-midnight (0 0 * * 1-5) handles the light nightly chores Monday through Friday, and this recipe handles the heavy work Saturday and Sunday — together they tile the week's midnights into light and heavy slots. Platform forms: EventBridge cron(0 0 ? * SAT,SUN *) (or the numeric 0,6), Quartz 0 0 0 ? * 1,7 (where its 1=SUN numbering makes Sunday 1 and Saturday 7 — the trap this site's Quartz recipes document), Celery crontab(hour=0, day_of_week='0,6'). The five-field core above is the portable version; the numberings are the porting risk.

Frequently asked questions

What does the cron expression "0 0 * * 0,6" mean?

"0 0 * * 0,6" is a Unix cron expression that means: At 12:00 AM, only on Sunday and Saturday. It contains 5 fields — Minute (0), Hour (0), Day of Month (*), Month (*), Day of Week (0,6) — and works in any scheduler that accepts the Unix cron format.

How does "0 0 * * 0,6" behave in UTC versus local time?

The classic cron daemon interprets every field in the machine's local timezone (from /etc/timezone or the TZ environment variable). If the server runs in UTC the schedule fires in UTC; otherwise shift the hours accordingly. Modern cronie also supports CRON_TZ to pin a single job to UTC.

What happens if the machine is offline when "0 0 * * 0,6" is due?

Classic cron does not catch up missed runs: if the server is down at the fire time, that execution is skipped until the next match. Guard the command with an idempotency check, or use anacron or a scheduler with missed-run handling when catch-up behavior matters.

Is Sunday 0 or 6 in the day-of-week field?

Sunday is 0 (with 7 as an alias in most implementations) and Saturday is 6, so 0,6 covers both weekend days — 0 0 * * 0,6 fires at Saturday midnight and Sunday midnight. Writing 6,0 behaves identically; cron treats day lists as sets. The trap lives in Quartz, which numbers 1=SUN through 7=SAT — there the weekend is 1,7, and porting a weekend schedule between dialects without remapping the numbers is a classic bug.

Does 'weekends at midnight' include Friday night?

Yes, in effect: Saturday 00:00 is the midnight immediately following Friday evening, so Friday-night maintenance is scheduled with this expression. The fire at Saturday 00:00 begins the weekend's quiet hours. If you also want the Sunday-night-to-Monday slot, it is the same schedule — Sunday 00:00 is already one of the two members of 0,6.

About the “0 0 * * 0,6” schedule

0 0 * * 0,6 is the Unix cron way to say “At 12:00 AM, only on Sunday and Saturday”. The simulator above evaluates it entirely in your browser — the timeline, the next-run table, and the timezone switcher all run client-side, so you can paste production schedules without them ever leaving your machine.

Every page in this directory follows the same structure: a plain-English translation, a per-field breakdown, platform-specific snippets, and a timezone-aware simulator. Move between the related intervals below to compare dialects, and validate one final time in the simulator with your own timezone before shipping.

Adjacent intervals and the same schedules expressed for other platforms.