Skip to the content

Cron Expression for Once a Year

0 0 1 1 * runs a job once a year, at 00:00 on 1 January, the same as @yearly. Change the day and the month below to pick another date.

At 00:00 on the 1st of January

FieldValueMatches
Minute00
Hour00
Day of month1the 1st
Month1January
Day of week*every day of the week

Next 10 runs

    Cron goes by the clock of the machine it runs on. These are the runs on a machine in your time zone.

    Share this tool:TwitterFacebookLinkedInWhatsAppEmail

    One run a year

    0 0 1 1 * reads as minute 0, hour 0, day 1, month 1: at 00:00 on 1 January. @yearly and @annually are shortcuts for it. For another date, change the third and fourth field. Month names are allowed, so Christmas Day can be written as 0 0 25 12 * or as 0 0 25 DEC *.

    ExpressionRuns
    0 0 1 1 *At 00:00 on the 1st of January
    @yearlyAt 00:00 on the 1st of January
    0 0 25 12 *At 00:00 on the 25th of December
    0 0 1 12 *At 00:00 on the 1st of December
    0 0 12 1 *At 00:00 on the 12th of January
    0 0 29 2 *At 00:00 on the 29th of February

    Day first, then month

    The day of the month comes before the month, whatever order dates have where you live. 0 0 1 12 * is 1 December and 0 0 12 1 * is 12 January. With a date like that the mistake goes unnoticed for months.

    29 February

    0 0 29 2 * is a valid schedule that runs only in leap years. The list of next runs shows it: there are four years between them.

    A job nobody watches

    A yearly job has had a year in which a path, a password or a server name could change, and cron will not tell you that it failed unless mail is set up for it. If the machine happens to be off at that minute, the run is lost, because cron does not catch up. Run the command by hand once in a while.

    The cron expression explainer has the full syntax: the five fields, lists, ranges and steps, and how day of month and day of week work together.

    See all 12