Run a Cron Job Twice a Month
A list in the day-of-month field fires on each value, so 0 0 1,15 * * runs at midnight on the 1st and the 15th — the semi-monthly rhythm of payroll, invoicing and twice-monthly reports. Because both days exist in every month, it never skips.
0 0 1,15 * *In plain English: At 00:00 (midnight), on day 1 and 15 of the month.
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0 |
| Hour | 0 | 0 |
| Day of month | 1,15 | 1 and 15 |
| Month | * | every month |
| Day of week | * | every weekday |
Variations
0 9 1,15 * *09:00 instead of midnight0 0 1,16 * *the 1st and 16th, splitting long months more evenly0 0 */14 * *not 'every 14 days' — it matches the 1st, 15th and 29thTweak any of these in the crontab explainer to see the schedule in plain English and its next run times.
Frequently asked questions
How do I run something every two weeks?
Cron can't count weeks. */14 in the day-of-month field matches the 1st, 15th and 29th, not every 14 days. Run weekly and let the job skip alternate weeks — for example, continue only when the ISO week number (date +%V) is even.
What if I pick the 31st?
The job only runs in months that have one, so 0 0 15,31 * * would skip February, April, June, September and November. Stick to days 1–28 for a dependable schedule.
New to cron syntax? Read Cron Expressions Explained, Field by Field. Job not firing? Work through Cron Job Not Running? 10 Things to Check.