0 0 */7 * * Every 7 days at 00:00 (step resets monthly) days The cron expression 0 0 */7 * * is the usual attempt at 'every 7 days at midnight' — and it is also one of the most misunderstood cron patterns. The day-of-month step */7 does not count 7-day intervals across month boundaries; it selects days 1, 8, 15, 22, 29 of every month and then restarts at day 1 when the next month begins. The gap between the last selected day of a month and day 1 of the next is therefore irregular, and in short months the pattern compresses further. If you need a true rolling 7-day interval, cron alone cannot guarantee it: run daily and let the script check a timestamp, use a systemd timer with OnUnitActiveSec, or use a scheduler that supports interval triggers. This page documents what the expression actually does, which is often close enough for coarse maintenance windows. Below are the field breakdown, the next five computed run times (watch the month boundary), and Quartz, Spring, Kubernetes and EventBridge equivalents with their day-field quirks.
Field-by-field breakdown
| Field | Value | Meaning |
|---|---|---|
| minute | 0 | only at minute 0 |
| hour | 0 | only at hour 0 |
| day-of-month | */7 | every 7 day-of-months, stepping from the start of the range (0 for minutes/hours, 1 for days) |
| month | * | every month (wildcard, no restriction) |
| day-of-week | * | every day-of-week (wildcard, no restriction) |
Next 5 run times (UTC)
Computed at build time; cross-check against your server's time zone before deploying.
2026-12-08 00:00 UTC2026-12-15 00:00 UTC2026-12-22 00:00 UTC2026-12-29 00:00 UTC2027-01-01 00:00 UTC
When to use this schedule
- Coarse maintenance cadences (every few days) where exact interval drift across months is acceptable.
- Periodic deep scans or integrity checks that are too heavy for daily runs but must not wait a full month.
- Staggered batch work spread across the month by day number rather than by weekday.
- Approximate recurring reminders where a timestamp-guarded daily job would be more precise but heavier to operate.
Equivalent syntax
The same schedule expressed for popular schedulers and platforms:
0 0 */7 * * /usr/local/bin/job.sh # Every 7 days at 00:00 (step resets monthly) 0 0 0 */7 * ? # Quartz (Java): 6-7 fields, leading seconds, '?' when day-of-week is set 0 0 0 */7 * * # Spring @Scheduled: 6 fields, leading seconds, day names accepted 0 0 */7 * * # Kubernetes CronJob schedule field: standard 5-field syntax cron(0 0 */7 * ? *) # AWS EventBridge: 6 fields incl. year, '?' required in one day field Caveats & gotchas
- Cron evaluates schedules in the server's local time zone; set CRON_TZ (cronie) or TZ (containers) explicitly on shared or distributed infrastructure.
- */7 in day-of-month resets on the 1st of each month; this is not a true rolling 7-day interval. For exact intervals use a systemd timer or a daily job with a timestamp guard.
- When both day-of-month and day-of-week are restricted, standard cron ORs them; keep one of the two as '*' unless you want that behavior.
Verify your schedule
After installing the schedule, verify it end to end instead of trusting the crontab line. Run 'crontab -l' to confirm the entry survived editing, then execute the command manually with the same user and environment to catch PATH and permission problems — cron runs with a minimal environment, so absolute paths and explicit SHELL/PATH declarations prevent the classic 'works in my terminal, fails in cron' bug. Watch the daemon log ('grep CRON /var/log/syslog' on Debian/Ubuntu, 'journalctl -u cron' or '-u crond' on systemd hosts) to confirm the trigger fires at the expected times, and redirect the job's own output to a log file with 2>&1 so failures are not swallowed by mail. Finally, cross-check the next run times listed on this page against your server's time zone before declaring the schedule correct.
Frequently asked questions
Does '0 0 */7 * *' really run every 7 days?
Not exactly. It runs on days 1, 8, 15… of each month and resets at the month boundary, so the interval between the last run of one month and the first of the next is irregular.
How do I get a true every-7-days schedule?
Run daily ('0 0 * * *') and let the script compare against a stored last-run timestamp, or use a systemd timer with OnUnitActiveSec, or a scheduler with interval triggers.
Why does the next-run list show an unexpected short gap?
That is the month-boundary reset: after the highest selected day ≤ 31, the next match is day 1 of the following month, which can be fewer than n days later.
Try the Cron Parser
Decode cron schedules and preview the next run times.