Cron Every Year (Yearly)
Once a year is a day and a month: 0 0 1 1 * runs at midnight on January 1, the same as @yearly and @annually.
minute · hour · day · month · weekday
Build it with controlsCustom
This expression is more detailed than these choices. Edit it in the box above, or pick one to start a new schedule.
In plain English
At midnight on January 1.
Tap a field to see what it means.
- Next run
- —
- Usually every
- —
- Time zone
- Yours
Convert to another schedulerQuartz, Spring, AWS, GitHub Actions, Kubernetes
| Standard cron | 0 0 1 1 * | current |
|---|---|---|
| Quartz | 0 0 0 1 1 ? | |
| Spring | 0 0 0 1 1 * | |
| AWS EventBridge | cron(0 0 1 1 ? *) | |
| GitHub Actions | 0 0 1 1 * | |
| Kubernetes | 0 0 1 1 * |
About Standard cronTime zone, day numbering, daylight saving
- Runs in the machine’s local time zone; cronie also reads CRON_TZ at the top of the crontab.
- Five fields, then the command. Day of week is 0–7 (0 and 7 are Sunday) or SUN–SAT; months 1–12 or JAN–DEC.
- When both day fields are set, a day that matches either one runs.
- Daylight saving: a job at a fixed time in a skipped hour runs right after the change, and one in a repeated hour runs once. Jobs with * in the minute or hour follow the clock.
Sources: crontab(5), cronie, cron(8), cronie, POSIX crontab.
How this works: Method, 10 sources, Checked against 1 worked example,
How this works
Method
The expression is read field by field with the rules of the scheduler you pick (ranges, lists, steps, names, @ macros, and L, W and # where it has them) into the values each field allows. The next runs come from stepping forward through the calendar in the chosen time zone, day by day and then time by time, using that scheduler’s rule for when both day fields are set and its documented rule for daylight saving (where it has none, a skipped time is skipped and a repeated one runs once). A conversion to another scheduler is parsed back and checked against the original before it is shown.
Sources
How it’s tested
One worked example for this page is checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Changes
- First version: plain English and the next runs for six schedulers, a builder, conversion between them, and 20 pages for common schedules.
Worked example: 0 0 1 1 *
Say the clock reads Monday 4 January 2027, 12:00 AM UTC. 0 0 1 1 * means “at midnight on January 1”, so the next five runs are Saturday 1 January 2028, 12:00 AM, Monday 1 January 2029, 12:00 AM, Tuesday 1 January 2030, 12:00 AM, Wednesday 1 January 2031, 12:00 AM and Thursday 1 January 2032, 12:00 AM.
In UTC, where no clock change interrupts it, that comes to 1 run in 2027.
One day a year
A yearly job fixes everything but the weekday: 0 0 1 1 * runs at midnight on 1 January. @yearly and @annually mean exactly this in Linux cron, Kubernetes and Spring.
Any date works the same way: 0 9 15 4 * runs at 9:00 AM every 15 April. Names are allowed for the month, 0 9 15 APR *.
Quartz and AWS can also limit the years with their year field: cron(0 0 1 1 ? 2027-2030) runs on four New Year’s Days and then stops. Linux cron has no year field, so a one-off job needs at(1) or a test in the command.
Pitfalls
- 0 0 29 2 * runs only in leap years: 2028, 2032 and so on, and not in 2100.
- Adding a weekday turns a yearly job into a weekly one in Linux cron (either day field matches).
- A job that runs once a year is easy to forget: log it, and check the next run here after any server or time zone change.
- @yearly and @annually run once a year, i.e. “0 0 1 1 *”. Source: crontab(5), cronie.
- AWS EventBridge cron expressions have a sixth field for the year, 1970–2199. Source: Amazon EventBridge Scheduler: schedule types.
“Every Year” in every scheduler
The same schedule written for each scheduler, converted and checked by this tool. A dash means that scheduler can’t express it in one expression; the note says why.
| Scheduler | Expression | Note |
|---|---|---|
| Standard Unix cron (Vixie cron, cronie) | 0 0 1 1 * | |
| Quartz Scheduler (Java) | 0 0 0 1 1 ? | |
| Spring Framework @Scheduled | 0 0 0 1 1 * | |
| Amazon EventBridge cron() | cron(0 0 1 1 ? *) | |
| GitHub Actions schedule | 0 0 1 1 * | |
| Kubernetes CronJob | 0 0 1 1 * |
Frequently Asked Questions
What is the cron for once a year?
0 0 1 1 * (or @yearly) runs at midnight on 1 January.
How do I run on a birthday every year?
Put the day and month: 0 8 23 7 * runs at 8 AM every 23 July.
Can cron run something only once?
Linux cron can’t limit years; use at(1) for a one-off. In Quartz and AWS, the year field can: cron(0 9 1 1 ? 2027).