CronExplain · cron recipes
Cron expression for the last day of every month
The cron expression for the last day of every month is 0 0 28-31 * *.
In plain English: at 00:00 on day(s) 28,29,30,31 of month.
Standard cron has no "last day" token. The usual workaround is to run on 28–31 and let the job itself check whether tomorrow is the 1st.
Field by field
| Field | Value | Means |
|---|---|---|
| minute | 0 | 0 |
| hour | 0 | 0 |
| day | 28-31 | 28, 29, 30, 31 |
| month | * | every month |
| weekday | * | every day of the week, weekends included |
Times it fires
Server local time, on every day the schedule matches.
00:00
Check your own expression
Paste any cron line and see what it means, the next ten times it fires, and the same breakdown in your timezone.
Open CronExplainOther schedules
- cron for every minute * * * * *
- cron for every 2 minutes */2 * * * *
- cron for every 5 minutes */5 * * * *
- cron for every 10 minutes */10 * * * *
- cron for every 15 minutes */15 * * * *
- cron for every 30 minutes */30 * * * *
- cron for every hour 0 * * * *
- cron for every 2 hours 0 */2 * * *