Cron example
Cron Every Year on January 1
One run a year: minute 0, hour 0, day 1, month 1 — midnight on New Year's Day, which is what the yearly and annually shorthands expand to. Two adjacent 1s that mean different things, and a schedule that gets exactly one chance a year to be correct.
By NaveenKumar T · Updated · 5-field crontab expression
What each field means
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | Minute 0 |
| Hour | 0 | Hour 0 |
| Day of month | 1 | Day 1 |
| Month | 1 | January |
| Day of week | * | Every day of the week |
Next 5 run times
Computing the next runs in your timezone…
Reading the two 1s
The third field is the day of the month and the fourth is the month, so 1 1 is the 1st day of the 1st month. Swap them and you get 0 0 1 1 * either way, which is why this particular expression hides its own field-order mistakes — a fact worth remembering when you adapt it. Change it to 25 December and the difference becomes visible immediately as 0 0 25 12 *.
The month field accepts names in most implementations, so 0 0 1 JAN * is the same schedule and considerably harder to misread. Cron's shorthand yearly and annually macros are also equivalent, and they are self-documenting in a way no numeric expression can be.
An annual job is a job you cannot trust
Between executions, twelve months of change accumulate: the host is rebuilt, the interpreter is upgraded, a credential rotates, the script's directory moves, the crontab is migrated to a new orchestrator. The next 1 January is the first time anyone finds out. Annual jobs fail far more often than their simplicity suggests, and they fail on a public holiday.
Defend against that. Alert on absence with a dead-man's-switch, not just on error. Make the job runnable on demand with an explicit year argument so a missed run can be replayed. And rehearse it — running the same command against a staging environment every quarter costs almost nothing and turns a yearly gamble into a routine.
Related annual patterns
For a different date, change the day and month fields: 0 0 1 4 * is 1 April, 0 0 31 12 * is New Year's Eve. For twice a year, list two months: 0 0 1 1,7 *. For four times a year, calendar quarters or every 3 months are the direct extensions of this shape.
Avoid 29 February entirely unless you mean it — a job pinned there runs once every four years, and every parser is happy to accept it without warning. If the intent is the end of February, the last-day pattern with a date guard is the honest way to write it.
Build a variant of this schedule with dropdowns and check the next ten runs before you install it.
Open the cron generatorRelated cron examples
Browse every schedule on the cron expression generator, read the cron expression syntax guide for the rules behind the five fields, or the developer tools guides for the longer explanations.