Cron expression for the last day of the month

Standard cron has no last-day-of-month token. The closest is 0 0 28-31 * * plus a one-line date check so the command only runs on the final day — the exact crontab is on this page.

0minute
0hour
28-31day
*month
*weekday

In Plain English

What your cron expression actually means.

At 12:00 AM, between day 28 and 31 of the month

Upcoming Executions

Preview the next 50 times this schedule will trigger.

Calculating…

About 0 0 28-31 * *

0 0 28-31 * * fires at midnight on the 28th, 29th, 30th and 31st whenever those dates exist — up to four times a month, not once. To act only on the real last day, keep that schedule and let the command check whether tomorrow is the 1st; the exact crontab below does that with GNU date (on macOS use date -v+1d +\%d instead of date -d tomorrow +\%d). Quartz-style schedulers accept L in the day field instead.

Cron reads the five fields as minute hour day month weekday. For this schedule that breaks down as:

FieldPositionMatches
0minute0
0hour0
28-31day of month28–31
*monthevery month
*day of weekevery day of the week

New to cron? Read the syntax reference or the FAQ.

Use it in crontab or GitHub Actions

The single line below is the closest cron gets, not the exact schedule (see above). A crontab runs in the server's local timezone; GitHub Actions always evaluates schedules in UTC. For Kubernetes, AWS EventBridge, or Vercel, use the export menu in the calculator above.

crontab

# At 12:00 AM, between day 28 and 31 of the month
0 0 28-31 * * /path/to/command

GitHub Actions workflow

# At 12:00 AM, between day 28 and 31 of the month
# Note: GitHub Actions always runs schedules in UTC.
on:
  schedule:
    - cron: '0 0 28-31 * *'

Exact version for crontab

0 0 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /path/to/command

Monthly & yearly schedules

Build a custom cron expression →