Skip to content
Unix cron100% Client-Side

Cron Expression for Weekdays at Midnight

0 0 * * 1-5At 12:00 AM, Monday through Friday

The Unix cron expression "0 0 * * 1-5" runs a task weekdays 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*
  • DOW1-5

At 12:00 AM, Monday through Friday

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 * * 1-5 is interpreted in the Unix cron format.

Field breakdown of 0 0 * * 1-5
FieldValueAllowedStatus
Minute00-59Valid
Hour00-23Valid
Day of Month*1-31Valid
Month*1-12 or JAN-DECValid
Day of Week1-50-7 or SUN-SAT (0 and 7 = SUN)Valid

Use “0 0 * * 1-5” 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 * * 1-5', () => {
  console.log('Running task...');
});

Running “0 0 * * 1-5” in production

Combining fields: a day-of-week range carrying a nightly time

0 0 * * 1-5 fires at midnight on Monday, Tuesday, Wednesday, Thursday, and Friday — five nights a week — and is built from the same pieces as the daily-midnight recipe with one field changed: the day-of-week range 1-5 replaces *. The composition is cron's core competence, and this particular combination is the nightly schedule for systems that follow the work week: development and staging database resets, test-data reloads, CI cache refreshes, non-production certificate rotations, and any nightly chore whose consumers are themselves offline on weekends. Skipping weekends saves 104 runs a year per job on machines where those runs were pure waste.

The semantics of the boundary deserve one careful sentence each. First, 'midnight Monday' is the midnight that begins Monday — the fire at 00:00 Monday operates on the weekend's final state, making it the natural 'prepare for the work week' slot. Second, Friday 00:00 (the week's last fire) operates on Thursday's data; anything meant to run 'end of Friday' needs Saturday 00:00 — 0 0 * * 6 in this grammar — or a 23:xx Friday schedule. Teams that conflate these two produce the classic 'why did the Friday-night job run Thursday-night data' incident, which the next-run table above resolves by simply showing which dates each fire lands on.

When the weekend silence is wrong: freshness and Monday backlogs

The weekend gap is a policy choice with consequences: between Friday 00:00 and Monday 00:00, seventy-two hours of change accumulate, and the Monday fire inherits them as one lump. For test-data reloads and cache refreshes that gap is harmless — the point of the schedule is cheap freshness for people who arrive Monday. For anything whose consumers keep working weekends (monitoring, customer-facing caches, security patching), the weekday restriction is the wrong policy and the plain 0 0 * * * is right; 'the office is closed' is a fact about people, not about servers, and cron cannot tell the difference.

Platform translation is direct: Kubernetes takes "0 0 * * 1-5" verbatim (timeZone available since 1.27), EventBridge writes cron(0 0 ? * MON-FRI *) with its names-and-question-mark dialect, Celery uses crontab(hour=0, day_of_week='1-5'), and systemd's OnCalendar=Mon..Fri *-*-* 00:00:00 expresses the same members in calendar syntax. All of them share cron's calendar blindness — public holidays get their midnight fire — so the job-side holiday guard remains the pattern wherever the policy is 'working days', not merely weekdays.

Frequently asked questions

What does the cron expression "0 0 * * 1-5" mean?

"0 0 * * 1-5" is a Unix cron expression that means: At 12:00 AM, Monday through Friday. It contains 5 fields — Minute (0), Hour (0), Day of Month (*), Month (*), Day of Week (1-5) — and works in any scheduler that accepts the Unix cron format.

How does "0 0 * * 1-5" 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 * * 1-5" 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.

Which days does 0 0 * * 1-5 fire on, exactly?

At 00:00 on Monday, Tuesday, Wednesday, Thursday, and Friday — five fires per week, 260 per year. The 1-5 range means Monday through Friday (0 and 7 are Sunday, 6 is Saturday). Note that 'Friday midnight' here is the midnight that begins Friday, not the one that ends it: the final fire of the work week lands at the start of Friday and processes Thursday's data.

How do I include weekend midnights only when needed, like Sunday for Monday prep?

Widen the list: 0 0 * * 0,1-5 adds Sunday midnight (0) for a Sunday-night prep run ahead of Monday, or use explicit members 0 0 * * 0,6 for the weekend nights themselves. Cron lists are free-form — any subset of 0-7 works. The rule of thumb: express exactly the nights the job's consumers need, because each midnight fire on an unused night is pure cost with no reader.

About the “0 0 * * 1-5” schedule

0 0 * * 1-5 is the Unix cron way to say “At 12:00 AM, Monday through Friday”. 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.