Cron Expression: Every Month
The monthly expression is 0 0 1 * * — midnight on the 1st of every month. Paste it above to read it in English and preview the next runs. Below: how to pick a different day and the @monthly shortcut.
The expression
0 0 1 * * runs a job once a month, at 00:00 on the 1st. Change the day-of-month field to shift it: 0 0 15 * * runs on the 15th.
Field by field
0 0 is 00:00 (minute and hour), 1 is the day-of-month, and the two * mean every month and every weekday. Because a specific day is set, the job fires only once per month.
The last-day problem
There is no plain cron syntax for “last day of the month” — months vary in length. A common workaround is to run daily and exit early unless it is the last day: 0 0 28-31 * * plus a date check in the script.
The @monthly shortcut
Schedulers that support shortcuts treat @monthly as an alias for 0 0 1 * * — midnight on the first.
FAQ
What is the cron expression for every month?
0 0 1 * * runs a job once a month at midnight on the 1st. Change the 1 to run on a different day.
How do I run a cron job on the last day of the month?
Cron has no native last-day token. Run 0 0 28-31 * * and have the script check whether tomorrow is the 1st before doing its work.
Is @monthly the same as 0 0 1 * *?
Yes. @monthly expands to 0 0 1 * * on schedulers that support it.