NV ToolkitFormat · Validate · Convert

Cron example

Cron Every Saturday

0 0 * * 6

At 12:00 AM, only on Saturday

Open in the cron expression generator

Saturday is day 6, the last value in cron's week, and this schedule fires at the very start of it — 00:00 on Saturday morning, which is the midnight at the end of Friday. That ambiguity in everyday speech is worth pinning down before you schedule a maintenance window around it.

By NaveenKumar T · Updated · 5-field crontab expression

What each field means

Minute, hour, day of month, month, day of week — read left to right.
FieldValueMeaning
Minute0Minute 0
Hour0Hour 0
Day of month*Every day
Month*Every month
Day of week6Saturday

Next 5 run times

Computing the next runs in your timezone…

Which midnight is Saturday's?

Midnight belongs to the day that is beginning, not the one that is ending. So 0 0 * * 6 runs at the instant Friday becomes Saturday — if you tell colleagues the job runs Saturday night, they will expect it roughly 24 hours later than it actually fires. When people say Saturday night they usually mean 0 0 * * 0, the midnight that starts Sunday.

Cron itself has no opinion here; it just matches the weekday of the current wall-clock time. But incident reviews, change windows and customer notices all depend on everyone meaning the same thing, so write the actual time — 00:00 Saturday — rather than a phrase like overnight Friday.

Why the weekend earns its own schedule

Weekend windows exist because they are the only times most systems are genuinely idle. Full backups, VACUUM FULL, index rebuilds, large data migrations, log compaction and archive uploads all want hours of uncontended I/O, and Saturday gives them a full 48 before Monday's traffic returns.

The trade-off is supervision. A Saturday job that fails is unlikely to be looked at until Monday, so it needs to be resumable, it needs to hold a lock so a retry cannot double up, and it needs to report success somewhere a human will notice on Monday morning. A weekend batch without a dead-man's-switch is a weekend batch you will eventually find has been broken for a month.

Adjusting the day and time

For a later start, change the hour: 0 3 * * 6 gives Friday's traffic time to drain. For both weekend days, use a list of day numbers, which is what every weekend does. For a Sunday-only run, Sunday at midnight is the mirror of this schedule.

For a fortnightly weekend job, cron cannot express every second Saturday directly — the day-of-week field has no notion of which occurrence it is. The workaround is the same guard-in-the-command approach described on the every second Tuesday page.

Build a variant of this schedule with dropdowns and check the next ten runs before you install it.

Open the cron generator

Related cron examples

Browse every schedule on the cron expression generator, read the cron expression syntax guide for the rules behind the five fields, or the developer tools guides for the longer explanations.