Skip to content
cronhelp.me
Guide · Foot-guns

Step that resets at the field boundary

Short answer
A step that does not divide its range evenly restarts at the field boundary, producing an uneven final gap. */7 on days is not weekly — it fires on the 1st, 8th, 15th, 22nd, 29th, then restarts.
Wrong"every week"
0 0 */7 * *
Rightuse the day-of-week field for a true weekly schedule
0 0 * * 0

Steps count from the start of the field and reset when the field does, so a step that does not divide the range evenly produces a short final interval before it starts over. It is not wrong — cron does exactly what it says — but the effect surprises people who read */7 as "every seven days".

In the day-of-month field, 0 0 */7 * * fires on the 1st, 8th, 15th, 22nd and 29th, then jumps back to the 1st of the next month. The gap between the 29th and the next 1st is two or three days, not seven, and the firing dates drift relative to the weekday. So this is emphatically not a weekly schedule, even though "every 7 days" sounds like one.

The same trap appears elsewhere. */40 * * * * in minutes fires at :00 and :40, then resets at the top of the hour — a 40-minute gap followed by a 20-minute one. Minute steps that divide 60 evenly (2, 3, 4, 5, 6, 10, 12, 15, 20, 30) stay even; the rest wobble at the hour boundary.

If you want a genuinely weekly cadence, use the day-of-week field: 0 0 * * 0 runs every Sunday, exactly seven days apart, forever. For "every N days" that must stay evenly spaced across month boundaries, standard cron cannot help — you need a job that tracks the interval itself, or a scheduler with real interval support. This finding is informational: if the reset behaviour is fine for your use, no change is needed.

Watch the linter flag it live — the finding below appears the moment the expression is entered:

Cron expression5-field
At 12:00 AM, every 7 days in a month
Lint
Infostep-uneven
This does not run evenly every 7 days: it runs on the 1st, 8th, 15th, 22nd and 29th, then starts over when the month ends, so the last gap is shorter than the others. If you wanted weekly, schedule a weekday instead ('0 0 * * 1' runs every Monday).
Learn more →
Next runs
#
1
2
3
4
5
6
7
Copy as
All lint rulesSeverity: Info