⏰

Cron Last Day of the Month

Cron for cron last day of the month

0
minute
0-59
23
hour
0-23
28-31
day of month
1-31
*
month
1-12 or jan-dec
*
day of week
0-6 or sun-sat
In plain English

At 23:00 on day 28, 29, 30 and 31 of the month

Next runs (UTC)

  • Sun, Aug 30, 2026, 11:00 PM
  • Mon, Aug 31, 2026, 11:00 PM
  • Mon, Sep 28, 2026, 11:00 PM
  • Tue, Sep 29, 2026, 11:00 PM
  • Wed, Sep 30, 2026, 11:00 PM
  • Wed, Oct 28, 2026, 11:00 PM

Shown in your local time zone. Most schedulers — Vercel Cron, GitHub Actions and Kubernetes among them — evaluate cron in UTC, so convert before you ship.

Common schedules

0 23 28-31 * *

At 23:00 on day 28, 29, 30 and 31 of the month

Field by Field

FieldValueMatches
Minute00
Hour2323
Day of month28-3128, 29, 30, 31
Month*every month
Day of week*every day

Standard Cron Cannot Express "Last Day"

There is no L in POSIX cron. Quartz and some cloud schedulers support it; crontab, Kubernetes CronJobs, GitHub Actions and Vercel do not.

The portable pattern is to fire on every candidate day and let the job decide:

``bash 0 23 28-31 * * [ "$(date -d tomorrow +%d)" = "01" ] && /opt/app/month-end.sh `

The schedule matches the 28th through the 31st; the guard runs the work only when tomorrow is the 1st. That is correct in February, in leap years, and in 30-day months without any special-casing.

Why Not Just Use the 1st

Month-end and month-start are different requirements. Closing the books, expiring subscriptions and taking a final snapshot must happen *inside* the month; reporting on it happens after. Using the 1st for month-end work loses the last day's data or attributes it to the wrong period.

Cloud Scheduler Support

AWS EventBridge accepts L in its own cron dialect, as does Quartz. If your platform supports it, use it — the guard pattern is a workaround, not a preference.

Time Zones

Standard crontab evaluates in system local time. Vercel Cron, GitHub Actions, Kubernetes CronJobs and AWS EventBridge all evaluate in UTC. If converting your local time crosses midnight, the day-of-week field shifts too — weekdays at 5pm in UTC-07:00 is 0 0 * * 2-6, not 0 0 * * 1-5.

The Day-Field Trap

When both the day-of-month and day-of-week fields are restricted, cron matches either, not both. 0 0 13 * 5 runs on every 13th *and* every Friday — not Friday the 13th. Leave one of them as * unless you genuinely want the union.

Other Common Schedules

ExpressionRuns
* * * * *Every minute
*/5 * * * *Every 5 minutes
*/15 * * * *Every 15 minutes
0 * * * *Every hour, on the hour
0 0 * * *Every day at midnight
0 9 * * *Every day at 9am
0 9 * * 1-5Weekdays at 9am
0 9 * * 1Every Monday at 9am

Making the Job Safe

  • Assume double firing. DST transitions, restarts and retries all cause it. Make the job
idempotent rather than assuming exactly-once.
  • Assume overlap. Cron starts the next run whether or not the last one finished. Take a
lock.
  • Avoid :00`. Every hourly job on the internet fires at the top of the hour; a random
minute spreads load on shared APIs.
  • Log the start and end. A cron job that silently stops running is invisible until
someone notices the missing output.

Frequently Asked Questions

What does `0 23 28-31 * *` mean?

At 23:00 on day 28, 29, 30 and 31 of the month. Reading the fields in order: minute, hour, day of month, month, day of week.

What time zone will this run in?

System local time under standard crontab, but UTC on Vercel, GitHub Actions, Kubernetes and AWS EventBridge. Convert before deploying — and remember that a conversion crossing midnight also shifts the day fields.

How do I test a cron expression without waiting?

Preview the next run times, as the tool above does, and run the job manually first. Never validate a schedule by waiting for it to fire in production — you learn about the mistake a day late.

Related Tools

Explore other tools you might find useful:

More Cron Expression Generator & Descriptor tools

You might also need