All recipes

Cron recipe

Cron job every 4 days: the exact expression

The expression

five-field cron
0 0 */4 * *

Paste it into crontab -e, your platform cron config, or tool.crontap.com/cronjob-debugger to preview the next runs.

What it does

Runs at midnight on days 1, 5, 9, 13, 17, 21, 25, and 29 of each month. Because the day-of-month step resets monthly, the gap after the final run varies with the length of the month.

When to use it

  • Warehouse snapshot refreshes

    Rebuild heavier reporting snapshots several times per month without a daily warehouse run.

  • Content and search cache rebuilds

    Refresh slower-changing indexes on predictable dates that are easy to inspect.

Common variations

  • 30 2 */4 * *

    The same stepped calendar days at 2:30am for an overnight maintenance window.

Run this with Crontap

External HTTP cron hits your URL on this schedule, stores every response, and emails you when a run fails. No daemon on the box, no drift when the server reboots. Pro schedules down to a 1-minute cadence, from $2.99/mo and scaling as you grow.

Related recipes

More patterns in the cron syntax cheat sheet and what is a cron job in Linux.

FAQ

What is the cron expression for every 4 days?
Use 0 0 */4 * * (standard five-field cron). Verify the next run times in the free cron debugger before you deploy.
Can Crontap run this schedule?
`0 0 */4 * *` is a calendar pattern, so the count restarts on day 1 of each month and the month-boundary gap can be shorter than 4 days. Crontap can run that expression as written. For a strict rolling 4-day interval, choose Human Readable and enter `4 days` instead.