−50%

50% off your first month on any paid plan · code WELCOME50 · until Nov 30

Start free →
Guide

Cron Every 3 Days: Why It Doesn't Work Like You Think

You'd expect <code>0 0 */3 * *</code> to run every three days. It doesn't — not the way most people mean it. The expression fires on days 1, 4, 7, 10... of each month, then resets on the 1st. Here's what actually happens and how to work around it.

Why 0 0 */3 * * isn't truly "every 3 days"#

The cron day-of-month field counts from 1 to 28/29/30/31 depending on the month. The */3 step operator means "starting from 1, every third value." That gives you days 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31.

Looks fine until the month changes. January 31st fires, then February 1st fires again. That's a 1-day gap, not 3. And in a 30-day month, day 28 fires, then day 1 of the next month. Also not 3 days apart. The day-of-month count starts over at 1 each month because cron doesn't track state between months — it just pattern-matches the current date against the expression.

We ran into this ourselves when scheduling a cleanup script that was supposed to keep exactly 10 snapshots, but the double-fire at month boundaries meant 11 or 12 snapshots some months, which quietly ate disk space until the monitoring alert caught it three weeks later.

What 0 0 */3 * * actually produces#

For a concrete example, here's what January through March looks like:

  • January: 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31 (11 runs)
  • February (non-leap): 1, 4, 7, 10, 13, 16, 19, 22, 25, 28 (10 runs)
  • March: 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31 (11 runs)

Between Jan 31 and Feb 1: one day. Between Feb 28 and Mar 1: also one day. Twice per quarter your "every 3 days" schedule fires on consecutive days. Whether this matters depends on the job. For a database vacuum, probably not. For an email digest your users expect every 3 days, it absolutely is.

Unlike scheduling every 5 minutes or every hour, multi-day intervals expose this cron limitation. You can build the expression visually and check the next 10 execution dates to see the gaps yourself.

Workaround 1: accept the approximation#

If your job is idempotent and running a day early occasionally doesn't cause harm, 0 0 */3 * * is perfectly fine. Most cleanup scripts, cache refreshes, and report aggregations fall into this category. The schedule averages out to roughly every 3 days across the year, and the month-boundary double-fire is a minor inconvenience that most teams never even notice because the job handles duplicate runs gracefully.

This is what we recommend for most use cases. Don't over-engineer the schedule if the job can handle it.

Workaround 2: fixed crontab dates each month#

Pick specific days that are 3 apart and accept the gap at month boundaries:

0 0 1,4,7,10,13,16,19,22,25,28 * *

This skips days 31 (and 29-30 depending on the month), so you get a longer gap at the end of each month instead of a shorter one. Ten runs per month, always on the same dates. Predictable, but the gap between the 28th and the 1st is 3-4 days depending on the month.

Workaround 3: day-of-year check for true every-3-day cron#

Let cron run daily and have the script itself decide whether to execute:

0 0 * * * /usr/bin/bash -c '[ $((\313 \% 3)) -eq 0 ] && /opt/scripts/cleanup.sh'

The backslash-escaped percent signs (\%) are required inside a crontab. Cron treats bare % as a newline, which would break the command. If you run this directly in a shell for testing, remove the backslashes.

This checks the day-of-year modulo 3. If it's divisible, run the script. With % 3 == 0, the first run is January 3rd (day 3). Change -eq 0 to -eq 1 to start on January 1st, or use any remainder value to shift the anchor day. The advantage is true 3-day intervals that don't reset at month boundaries. But you're running cron every day and most executions do nothing. And on leap years, the day-of-year numbers shift by one from March onward, so the 3-day rhythm drifts relative to calendar dates for the rest of the year.

Not elegant. But it's the closest cron gets to a real "every N days" schedule without external state. For simpler intervals, see our cron jobs overview.

Workaround 4: let Cloud Cron handle it#

Cloud Cron supports interval-based scheduling that doesn't reset at month boundaries. Set it to "every 72 hours" and it fires exactly every 3 days from the anchor point, regardless of which month it is. No script-level hacks, no day-of-year math.

This avoids the script-level workarounds if you need true 3-day intervals. Cloud Cron includes monitoring built in, so you'll know immediately if a run fails without setting up a separate watcher.

Monitoring a cron job every 3 days#

How quickly would you notice a failure on a job that runs every 3 days? If it breaks on Tuesday, the next expected run isn't until Friday. That's a long window for silent failure. A log file won't help if nobody checks it for three days.

Cron job monitoring solves this. Your script pings a URL on completion, WatchCron expects the ping every 3 days, and any missed ping triggers an alert through Slack, email, Telegram, or 16 other channels. We set a grace period of 30 minutes for these longer-interval jobs, enough to account for slow runs without masking genuine failures.

Frequently asked#

The closest expression is 0 0 */3 * *, which runs on days 1, 4, 7, 10, etc. of each month. But it resets at month boundaries, so the gap between the last run of one month and the first of the next can be as short as 1 day.

Cron is stateless. It evaluates each field against the current date/time without remembering when the job last ran. The step operator */N in the day field means "every Nth day of the month," not "every N days from the last execution."

Standard cron can't do exact 72-hour intervals. Workarounds include a daily cron that checks $(date +%j) % 3, or using an interval-based scheduler like Cloud Cron that doesn't reset at month boundaries.

Yes, if the job is idempotent and an occasional 1-day gap doesn't cause problems. For cleanup scripts, cache refreshes, and report generation, the approximation is usually fine. Only jobs that depend on exact 3-day spacing need workarounds.

Written by Vitalii Holben

Founder of WatchCron. Full-stack developer building monitoring tools that help teams keep cron jobs, uptime, and SSL certificates under control. Based in Europe, shipping code since 2014.

Start monitoring in under 2 minutes.

Free plan includes 20 checks · No credit card required
Pricing Docs
Log in Start free →