Cron example · Monthly and yearly

Twice a month (1st and 15th) in cron

Runs at 00:00 on the 1st and the 15th of every month.

0 0 1,15 * * Open in the generator

A comma list in the day-of-month field selects specific dates. 1,15 is the semi-monthly schedule used for payroll, statements and billing cycles; any dates from 1 to 31 can be listed.

Dates past 28 are skipped in shorter months, so 1,31 would run once in April. If the second run must be "the last day", see the last-day-of-month workaround.

Field by field

ValueFieldMeaning
0Minute
0–59
at minute 0
0Hour
0–23
at 00:00
1,15Day of month
1–31
on day 1, on day 15
*Month
1–12 or JAN–DEC
every month
*Day of week
0–7 or SUN–SAT (0 and 7 are Sunday)
every day of the week

Next run times

Computed in your browser from the current time, so you can check the schedule against a clock you trust.

Your timezone (local)

  1. Needs JavaScript.

UTC (GitHub Actions, Kubernetes default)

    Variations

    • 0 9 1,15 * *the 1st and 15th at 09:00 · try it
    • 0 0 1 * *once a month · see page
    • 0 0 28-31 * *last day of the month (with a guard) · see page

    Where this expression works

    • Linux and macOS crontab: as written; times follow the system timezone.
    • Kubernetes CronJob: the same five fields; UTC unless spec.timeZone is set.
    • GitHub Actions: the same syntax in UTC, minimum interval five minutes, no @ shortcuts.
    • AWS EventBridge: a different six-field syntax; do not paste this expression unchanged.

    Full platform comparison · Cron tutorial

    FAQ

    Can I run every two weeks instead?

    Not exactly with cron, since months are not 28 days. Run weekly and have the script skip alternate weeks based on the ISO week number.