Tools › Cron examples › the first day of every month

Cron expression for the first day of every month

The cron expression for the first day of every month is:

0 0 1 * *

What it does

Runs at 00:00 on the 1st of each month. @monthly is a shortcut for the same schedule.

Field by field

FieldValueMeaning
Minute0exactly 0
Hour0exactly 0
Day of month1exactly 1
Month*every value
Day of week*every value

Typical uses

Monthly invoices, usage resets, and monthly reports.

Watch out for

Day 31 does not exist in every month, so 'last day of the month' needs a different approach (see the last-day-of-month example).

Add it to your crontab

crontab -e, then add:

0 0 1 * * /path/to/command >> /var/log/myjob.log 2>&1

Related schedules

every minuteevery 5 minutesevery 10 minutesevery 15 minutesevery 30 minutesevery hourevery 2 hoursevery day at midnightevery day at 3amevery weekday at 9amevery 15 minutes during business hoursevery Mondayevery Sunday at midnighton weekendson the last day of the monthevery quartertwice a day
Copied to clipboard