Backups are the jobs cron was made for: repetitive, predictable, and much better run at 3 in the morning than remembered at 3 in the afternoon. They are also where a wrong expression hurts quietly: a schedule that fires on the wrong day, at a busy hour, or on top of a second backup can run for weeks before anyone notices.
This guide writes the three backup schedules almost everyone needs, daily, weekly and monthly, reads each one field by field, and shows how to check all three with the free Cron Expression Builder on Ovatly. It also covers staggering, so the jobs never collide, and the time zone gap between your screen and your server.
Contents
- Quick answer
- The three patterns, field by field
- Staggering: why the times are different on purpose
- The time zone caution
- How to check each pattern, step by step
- Worked example: the night all three schedules meet
- Limitations and honest notes
- Common mistakes
- FAQs
- Conclusion
Quick answer
A daily backup at 02:30 is 30 2 * * *. A weekly backup on Sunday at 03:00 is 0 3 * * 0. A monthly backup on the 1st at 04:00 is 0 4 1 * *. Each pins the minute and hour, then restricts exactly one day field: none for daily, day of week for weekly, day of month for monthly. The hours differ so the jobs never start together. Paste any of them into the Cron Expression Builder and read the description and next five run times to confirm the pattern.
The three patterns, field by field
A cron expression has five fields in a fixed order: minute (0-59), hour (0-23), day of month (1-31), month (1-12) and day of week (0-7, where both 0 and 7 are Sunday). An asterisk means every value.
- Daily at 02:30,
30 2 * * *. Minute 30, hour 2. The three date fields are asterisks, so nothing restricts the day. - Weekly on Sunday at 03:00,
0 3 * * 0. Minute 0, hour 3. The restriction sits in the last field: day of week 0 is Sunday, so the job fires once a week. - Monthly on the 1st at 04:00,
0 4 1 * *. Minute 0, hour 4. Here the restriction sits in the third field: day of month 1, so the job fires once a month, on the first.
The shape is the whole lesson: pick the time with the first two fields, then express the rhythm by restricting at most one day field. Confusing the two day fields is the classic backup mistake: 0 3 1 * * is not a weekly Sunday job, it is a monthly job on the 1st at 03:00.
Staggering: why the times are different on purpose
The three times above, 02:30, 03:00 and 04:00, are not decoration. Backup jobs are heavy: they read large parts of a disk and write large archives, often to the same storage. Two running at once slow each other down, and one that starts while another is still writing can copy files mid-update: an archive that does not restore cleanly.
So give each job its own slot, sized to reality. If your daily backup normally takes 20 minutes, a 30 minute gap before the weekly job is comfortable; if it sometimes takes an hour, that gap is overlapping with extra steps. Measure the longest run, not the average. The monthly job gets the latest slot, 04:00, because it most likely copies the largest set.
The time zone caution
The builder lists run times in your local time zone; most servers run cron in UTC. The expression does not change, but its hour is read in the scheduler's zone: 30 2 * * * on a UTC server fires at 02:30 UTC, which five hours ahead of UTC is 07:30 in your morning.
Decide which zone you are thinking in before you pick the hour. If the server is on UTC and you want the backup at 02:30 your time, subtract your offset and write the UTC hour in the expression. This mismatch is the most common reason a backup "runs at the wrong time" despite a correct expression.
How to check each pattern, step by step
- Open the Cron Expression Builder and paste the first expression,
30 2 * * *, into the lower field. - Read the plain-English description and the next five run times: for the daily pattern, consecutive days at the same time.
- Replace it with
0 3 * * 0. The run times should now be a week apart, each on a Sunday. - Replace it with
0 4 1 * *. The list should jump a month at a time, each entry on the 1st.
Worked example: the night all three schedules meet
Sooner or later the calendar lines the patterns up: the 1st falls on a Sunday, and all three schedules fire on one night:
02:30 daily backup 30 2 * * *
03:00 weekly backup 0 3 * * 0
04:00 monthly backup 0 4 1 * *
The daily job starts first and, at a typical 20 minutes, is done before the weekly starts at 03:00. The monthly, the largest job, starts last at 04:00 with nothing behind it. No two jobs read and write at once, and each archive copies a settled disk rather than another backup in progress.
Compare the same night with all three at midnight: all fire at 00:00, compete for the same disk, and the weekly and monthly jobs copy a directory the daily job is still writing to. The staggering makes the set trustworthy.
Limitations and honest notes
The builder covers standard five-field cron only. Seconds and year fields from Quartz-style schedulers are not included, so expressions written for those systems need trimming to five fields first.
Cron decides when a backup starts, not whether it succeeded. A schedule can be perfect while the job fails nightly on a full disk. Check the archives themselves from time to time; the next-run list checks timing only.
One standard cron behaviour matters here: when both day fields are restricted, a day matches if either matches. A pattern like 0 3 1 * 0, which looks like "the 1st, if it is a Sunday", actually fires on the 1st and on every Sunday. That is why each pattern here restricts only one day field.
Common mistakes
- Restricting both day fields.
0 3 1 * 0fires on the 1st and on every Sunday, thanks to the either-or rule. Weekly means day of week only; monthly means day of month only. - Confusing the weekly and monthly fields. Day of week is the fifth field, day of month the third. Swapping them turns a Sunday backup into one on the 1st, silently.
- Running everything at midnight. The default hour is the crowded hour. Stagger into the quiet hours instead.
- Picking the hour in the wrong time zone. The expression is read in the scheduler's zone, usually UTC, not yours.
- Staggering by the average run time. Jobs overlap on their slow nights, not their average ones. Size the gap to the longest run.
FAQs
What is the cron expression for a daily backup at 02:30?
30 2 * * *. Minute 30 and hour 2 pin the time, and the three date fields are asterisks, so it fires every day. Check it in the builder: the next five run times are consecutive days at 02:30.
How do I run a backup only on Sundays?
Restrict the day-of-week field: 0 3 * * 0 fires at 03:00 every Sunday, because 0 in the day-of-week field is Sunday. Keep the day-of-month field as an asterisk, or the either-or rule between the two day fields will widen the schedule.
How do I run a backup on the first of every month?
Restrict the day-of-month field instead: 0 4 1 * * fires at 04:00 on the 1st of every month. Keep the day-of-week field as an asterisk for the same reason.
Why did my backup run at the wrong hour? Probably a time zone mismatch. The builder lists run times in your local zone, but most servers schedule in UTC. A 02:30 expression on a UTC server fires at 02:30 UTC, which can be the middle of your afternoon.
Should the daily, weekly and monthly backups run at the same time? No. On the 1st of a month that is also a Sunday, all three schedules can land on the same night. Stagger the hours, as this guide does with 02:30, 03:00 and 04:00, and leave a gap sized to how long the longest backup actually takes.
Conclusion
Three expressions cover the standard backup rhythm: 30 2 * * * daily, 0 3 * * 0 weekly on Sunday, and 0 4 1 * * monthly on the 1st. Pin the time, restrict one day field only, stagger the hours, and convert the hour for the server's time zone before you save anything. Check each expression in the Cron Expression Builder and read the next five run times: a week of Sundays and a run of 1sts are unmistakable when they are right. If */15-style steps have ever puzzled you, the companion guide on what */15 means in a cron expression explains the step operator field by field, and the full set of guides for this category lives in the Developer Tools guides archive.