Cron Expression: First of the Month
The expression is 0 0 1 * *. Paste it above to read it in English and preview the next local run times.
The expression
0 0 1 * * runs a job at midnight on the 1st of every month.
Field by field
0 0 = midnight. The third field 1 is the day of month; * * leave month and weekday open, so it fires on the 1st of all twelve months.
Common variations
First of the month at 6am: 0 6 1 * *. First of every quarter: 0 0 1 1,4,7,10 *. 15th of the month: 0 0 15 * *.
Day-of-month vs weekday
If you set both the day-of-month and weekday fields to non-wildcards, most crons treat it as an OR — the job runs when either matches, which surprises people. Keep one of them as *.
FAQ
How often does 0 0 1 * * run?
Once a month, at midnight on the 1st — 12 times a year.
How do I run on the first of each quarter?
Use 0 0 1 1,4,7,10 * for Jan, Apr, Jul and Oct.
Why should I not set day-of-month and weekday together?
Most crons OR the two fields, so the job runs on either match instead of both — usually not what you want.