Run a cron job every 2 days with 0 0 */2 * *.
The cron expression 0 0 */2 * * uses the step operator (*/2) in the day-of-month field to run every 2 days. It triggers at midnight on days 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 of each month. Note that the count resets at the start of each month, so the schedule is not perfectly uniform across month boundaries. Use cases for every-2-day schedules include periodic data exports, bi-weekly report generation, alternating maintenance windows, scheduled content publishing, and recurring health assessments that don't align with weekly or monthly boundaries. For Quartz Scheduler, use 0 0 */2 * ? (swap day-of-month and day-of-week, use ? for day-of-week). For AWS EventBridge, use cron(0 0 */2 * ? *) (add year field). For Kubernetes CronJob, use schedule: "0 0 */2 * *" directly. A limitation: */2 in the day-of-month field resets at each month boundary. For truly continuous every-2-days scheduling (including across month boundaries), store the last run date in a file or database and check it in your script. If you need business-day logic (skip weekends), cron cannot express this natively. Use a daily cron (0 0 * * *) with a script that calculates business-day intervals.
The expression 0 0 */2 * * means: at minute 0, hour 0, day-of-month */2, month *, day-of-week *. Each field in the cron expression controls a different time component: minute, hour, day of month, month, and day of week.
Run crontab -e in your terminal to open your crontab editor. Add a new line: 0 0 */2 * * /path/to/your/script.sh. Save and exit. Verify with crontab -l. Make sure your script is executable (chmod +x script.sh) and uses full paths for all commands.
Quartz Scheduler: 0 0 */2 * *. AWS EventBridge: cron(0 0 */2 * ? *). Kubernetes CronJob: schedule: "0 0 */2 * *" (standard 5-field format). Each platform has slight syntax differences — use our dialect switcher above to get the exact expression.
Yes. The */2 step in the day-of-month field resets on the 1st of each month. For continuous every-2-days scheduling across month boundaries, use a daily cron (0 0 * * *) and track the last-run date in a file or database.
Common pitfalls: (1) Cron uses a minimal PATH — always use full paths to commands and scripts. (2) Percent signs (%) must be escaped with backslash in crontab. (3) Cron runs in the system timezone — set CRON_TZ=UTC at the top of your crontab for consistent UTC scheduling. (4) Redirect output to prevent email spam: 0 0 */2 * * /path/command >> /var/log/myjob.log 2>&1. (5) Test your cron expression with crontab.guru or our validator above before deploying.
The cron expression 0 0 */2 * * has different syntax on various scheduling platforms. Here is the equivalent expression for each:
| Platform | Expression |
|---|---|
| Unix / Linux crontab | 0 0 */2 * * |
| Quartz Scheduler (Java) | 0 0 */2 * * |
| AWS EventBridge | cron(0 0 */2 * ? *) |
| Kubernetes CronJob | 0 0 */2 * * |
| Vercel Cron | 0 0 */2 * * |
| GitHub Actions | 0 0 */2 * * (UTC) |
Key differences across platforms: Quartz uses 7 fields starting with seconds and supports L (last) and W (weekday) modifiers. AWS EventBridge requires a 6th year field and uses ? instead of * in day fields when the other day field is specified. Kubernetes uses standard 5-field Unix cron. Vercel Cron uses the same format but schedules are defined in vercel.json. GitHub Actions uses standard cron but runs in UTC timezone only, so adjust the hour field for your local timezone offset.
Follow these tips when setting up cron jobs in production: