Cron: Run on the 1st and 15th of Every Month
To run a cron job on the 1st and 15th of every month — the classic payroll or billing cadence — use 0 0 1,15 * *. The comma list 1,15 in the day-of-month field fires the job at midnight on both dates.
The expression
0 0 1,15 * * runs on the 1st and 15th of every month. Copy it straight into your crontab with crontab -e.
How the day-of-month list works
0 0 1,15 * * reads: minute 0, hour 0, on days 1 and 15, every month. It runs exactly twice a month, at 00:00. Change the first two fields to pick a different time, e.g. 30 9 1,15 * * for 09:30.
FAQ
What is the cron expression to run on the 1st and 15th of every month?
0 0 1,15 * * — read it field by field: minute, hour, day-of-month, month, day-of-week.
How do I limit a cron job to Monday-Friday?
Set the fifth field (day-of-week) to 1-5. 0 and 7 are Sunday, 6 is Saturday, so 1-5 is Monday through Friday and weekends are skipped.
Does cron count hours in 24-hour time?
Yes. The hour field is 0-23, where 0 is midnight, 12 is noon and 17 is 5 PM. There is no AM/PM in cron.