ClockOrbit

Yearly

0 0 31 12 *

Run once a year, midnight at the start of December 31st.

This preview is live: the table below shows the actual next run times for 0 0 31 12 * in your time zone, recomputed in your browser. Change the expression, dialect, or zone to experiment, then copy the result.

Next runs
valid
Upcoming runs
Thu, Dec 31 2026
00:00 UTC
in 54 days
Fri, Dec 31 2027
00:00 UTC
in 419 days
Sun, Dec 31 2028
00:00 UTC
in 785 days
Mon, Dec 31 2029
00:00 UTC
in 1150 days

What 0 0 31 12 * means

0 0 31 12 * fires at the very start of December 31st, midnight as the last day of the year begins. It is the slot for end-of-year close work that needs the whole final day to run, as opposed to 0 0 1 1 * which fires after the year has already turned.

The distinction matters for fiscal and reporting jobs: closing the year's books on the morning of the 31st, versus archiving the completed year on the 1st. Pick the boundary that matches whether you want the last day included or excluded.

Field-by-field breakdown

Unix cron has five fields. Here is what each one is doing in this expression:

FieldValueMeaning
Minute0minute = 0
Hour0hour = 0
Day of month31day-of-month = 31
Month12month = 12
Day of week*every day-of-week

New Year's Eve at midnight in every scheduler

The same cadence written for the seven cron dialects you are most likely to meet. Copy the line for the system you target, the field count and day-of-week numbering differ between them.

SchedulerExpressionCopy
Unix / crontab0 0 31 12 *
GitHub Actions0 0 31 12 *
Kubernetes CronJob0 0 31 12 *
Vercel Cron0 0 31 12 *
Quartz0 0 0 31 12 ? *
Spring0 0 0 31 12 ?
AWS EventBridge0 0 31 12 ? *

When you would use 0 0 31 12 *

The gotcha worth knowing

Midnight on the 31st is the *start* of the 31st, not the end of the year. If you want "after the year ends", that is 0 0 1 1 * (Jan 1). Off-by-one-day errors here are common in financial code.

People also search for

cron december 31cron new years evecrontab end of yearcron 0 0 31 12

0 0 31 12 * FAQ

What does the cron expression 0 0 31 12 * mean?

0 0 31 12 * means: Run once a year, midnight at the start of December 31st. 0 0 31 12 * fires at the very start of December 31st, midnight as the last day of the year begins. It is the slot for end-of-year close work that needs the whole final day to run, as opposed to 0 0 1 1 * which fires after the year has already turned.

How do I write "new year's eve at midnight" in GitHub Actions?

Use 0 0 31 12 * in the schedule's cron field. Midnight on the 31st is the *start* of the 31st, not the end of the year. If you want "after the year ends", that is 0 0 1 1 * (Jan 1). Off-by-one-day errors here are common in financial code.

How do I write "new year's eve at midnight" for AWS EventBridge?

EventBridge uses six fields with a required year and a ? placeholder in one day field: 0 0 31 12 ? *. Wrap it as cron(0 0 31 12 ? *) in the console or CloudFormation.

What is the Quartz equivalent of 0 0 31 12 *?

Quartz is seconds-first with a trailing year, so the equivalent is 0 0 0 31 12 ? *. Remember Quartz numbers Sunday as 1, the opposite of Unix.

Related cron patterns

More cron tools

Browse the full set of cron pattern pages, or jump to the interactive tools: the cron expression builder for designing a schedule from scratch, the cron cheat sheet for a side-by-side reference, the cron timezone translator for moving a schedule between zones and dialects, and the GitHub Actions cron picker for DST-stable CI schedules.