The closest cron expression for every other day is 0 0 */2 * *, but the step restarts on the 1st of every month. See when it actually runs, and the one-line crontab that makes the spacing exact.
Paste an expression or choose a starting schedule below.
Select a field to edit it.
*/2 isn't really every 2 days
The day-of-month field restarts on the 1st of every month, so the last run of a month is followed by a run on the 1st — anywhere from 1 to 2 days later depending on the month. For an exact spacing, run daily and have the command skip days.
Schedule summary
Build a schedule
Use the fields above to edit this expression, or replace it with a simple schedule here.
Upcoming runs
The next 50 runs, shown in the schedule timezone and your local time.
About 0 0 */2 * *
0 0 */2 * * runs at midnight on the 1st, 3rd, 5th… of each month. Because the day-of-month step restarts on the 1st, a 31-day month ends with runs on the 31st and then the 1st — one day apart. For a spacing that survives month ends, run daily and let the command skip every other Unix day; the exact crontab below does that (the backslashes stop crontab from treating % as a newline).
Cron reads the five fields as minute hour day month weekday. For this schedule that breaks down as:
| Field | Position | Matches |
|---|---|---|
0 | minute | 0 |
0 | hour | 0 |
*/2 | day of month | 1, 3, 5, 7, 9, 11, … 31 (16 values) |
* | month | every month |
* | day of week | every day of the week |
New to cron? Read the syntax reference or the FAQ.
Use it in crontab or GitHub Actions
The single line below is the closest cron gets, not the exact schedule (see above). The crontab timezone setting requires a compatible daemon such as Cronie. GitHub Actions defaults to UTC and accepts a timezone on each schedule. For other timezones, Kubernetes, EventBridge Scheduler, or Vercel, use the export menu in the calculator above.
crontab
# At 12:00 AM, on day 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, and 31 of the month # CRON_TZ requires a cron implementation that supports it, such as Cronie. CRON_TZ=UTC 0 0 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 * * /path/to/command
GitHub Actions workflow
# At 12:00 AM, on day 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, and 31 of the month
on:
schedule:
- cron: '0 0 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 * *'
timezone: "UTC"Exact version for crontab
0 0 * * * [ $(expr $(date +\%s) / 86400 \% 2) -eq 0 ] && /path/to/command