Run Task at Midnight on New Year's Day
15 22 1 1 * Runs at 12:00 AM on January 1st, every year.
* In a Nutshell
The cron expression 15 22 1 1 * runs Runs at 12:00 AM on January 1st, every year.. This cron expression is ideal for annual administrative tasks that must occur precisely on New Year's Day. Examples include generating year-end financial reports, resetting annual system counters, or deploying a specific version of code intended for the new year.
* When to use this
Use 15 22 1 1 * when a recurring task needs to run Runs at 12:00 AM on January 1st, every year.. This schedule is commonly associated with daily schedules and monthly schedules and quartz scheduler and weekly schedules workloads. It uses Standard (5-Field POSIX) syntax, supported by Unix cron daemons, cloud schedulers such as AWS EventBridge, and container orchestration platforms such as Kubernetes CronJob.
CronBase parses 15 22 1 1 * using a dialect-aware rules engine that identifies the Standard (5-Field POSIX) format, validates field structure against the Standard (5-Field POSIX) specification, and produces the translation above. Next run times are calculated by forward-scanning from the current UTC clock. Learn how CronBase works.
Platform Implementations
Bash
Add the cron expression '0 0 1 1 *' to your crontab using crontab -e.
0 0 1 1 * Last verified:
Nodejs
Use a library like node-cron and schedule the task with the cron string '0 0 1 1 *'.
0 0 1 1 * Last verified:
Python
Utilize the schedule library and schedule your job with the cron string '0 0 1 1 *'.
0 0 1 1 * Last verified:
Golang
Employ the gocron library and specify the cron string '0 0 1 1 *' for your job.
0 0 1 1 * Last verified:
Java
With Quartz Scheduler, use the cron expression '0 0 1 1 *' in your trigger configuration.
0 0 1 1 * Last verified:
Kubernetes
Define a CronJob in Kubernetes with the spec.schedule set to '0 0 1 1 *'.
0 0 1 1 * Last verified:
AWS EventBridge Equivalent
Standard cron expressions often need conversion for AWS EventBridge schedules.
cron(15 22 1 1 ? *) Frequently Asked Questions
What does this cron expression do?
This expression is set to trigger a job exactly at midnight (00:00) on the first day of the year, January 1st. It will execute annually on this specific date and time.
Does this expression account for time zones?
Cron expressions themselves do not inherently understand time zones. The execution time is relative to the server's or scheduler's system time. Ensure the server's time zone is correctly configured to match your intended local time for January 1st, 00:00.
How can I verify this cron job runs correctly?
You can verify by setting up a test job that logs the current date and time when executed. Monitor your logs around January 1st of the next year to confirm the job fired at the precise time expected.
What is a common variation of this schedule?
A common variation might be to run a task on the *last* day of the year (December 31st) at midnight, using '59 23 31 12 *'. This would execute the job just before the new year begins.
What is a potential gotcha with this expression?
A significant gotcha is the 'year-boundary-rollover' edge case. While this expression targets January 1st, systems might experience unexpected behavior or delays during the critical midnight transition from December 31st to January 1st, potentially causing missed or delayed executions.
More schedules like this
Explore Daily Schedules →* Try any expression
Standard, Quartz, AWS EventBridge, Jenkins, named schedules (@daily, @hourly…)
* Keep Exploring