All recipes

Cron recipe

Cron job every 2 days: the exact expression

The expression

five-field cron
0 0 */2 * *

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, 3, 5, … 31 of each month. The `*/2` step applies to the day-of-month field, so this is an odd-numbered calendar-day pattern rather than a guaranteed 48-hour timer.

When to use it

  • Alternating-day data syncs

    Refresh a catalog or partner feed more often than weekly without paying for a daily import.

  • Routine cleanup jobs

    Prune temporary files or stale cache entries on alternating calendar days.

Common variations

  • 0 6 */2 * *

    The same alternating calendar-day pattern at 6:00am instead of midnight.

Run this with Crontap

External HTTP cron hits your URL on this schedule, records every run, 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 2 days?
Use 0 0 */2 * * (standard five-field cron). Verify the next run times in the free cron debugger before you deploy.
Can Crontap run this schedule?
Cron counts days of the month, so `0 0 */2 * *` restarts on the 1st and the gap at a month boundary can be shorter than 2 days. A single standard 5-field cron cannot preserve exact rolling 2-day spacing across month boundaries. For a predictable approximation, use fixed weekdays such as Monday, Wednesday, and Friday (`0 0 * * 1,3,5`), which produces 2/2/3-day gaps each week.