Cron example · Hours

Every 2 hours in cron

Runs at 00:00, 02:00, 04:00 … 22:00.

0 */2 * * * Open in the generator

The hour step counts from 0, so */2 selects the even hours. If you want the odd hours instead, give the step a starting point: 0 1-23/2 * * * runs at 01:00, 03:00 … 23:00.

Steps in the hour field reset at midnight. */5 in the hour field gives 0, 5, 10, 15, 20 and then 0 again, so the last gap of the day is four hours, not five.

Field by field

ValueFieldMeaning
0Minute
0–59
at minute 0
*/2Hour
0–23
every 2 hours
*Day of month
1–31
every day of the month
*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 1-23/2 * * *every 2 hours on odd hours · try it
    • 0 */6 * * *every 6 hours · see page
    • 15 */2 * * *every 2 hours at a quarter past · try it

    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

    How do I run every 2 hours starting at 09:00?

    Use a list or a bounded range: 0 9-23/2 * * * runs at 09:00, 11:00 … 23:00.