cronkit.org
Cron expressions, explained and converted — in your browser

Cron tools › Common schedules

Cron every 2 hours

copy-ready in 7 dialects · next runs in your time zone

0 */2 * * * — At minute 0 of every second hour — 00:00, 02:00, 04:00 … 22:00 — twelve runs a day. The 0 in the minute field is essential.

Runs

Try one

The same schedule in every dialect

WhereExpression
Linux / Unix crontab, Kubernetes, GitHub Actions0 */2 * * *explain
Quartz Scheduler0 0 0/2 ? * *explain
AWS EventBridgecron(0 0/2 * * ? *)
rate(2 hours)
explain
Spring @Scheduled0 0 */2 * * *explain
JenkinsH H/2 * * *H calculator
systemd timer OnCalendar=*-*-* 00/2:00:00test

AWS rate(2 hours) repeats at a fixed interval from when the rule or schedule was created, so it is not aligned to the clock the way the cron() form is.

Things to know

Variations

ExpressionRuns
0 1-23/2 * * *every two hours at odd hours
30 */2 * * *every two hours at half past
0 8-18/2 * * 1-5every two hours from 08:00 to 18:00 on weekdays

How to use this schedule

  1. Open your crontab with crontab -e (or the scheduler's config file).
  2. Add a line with the expression followed by the command: 0 */2 * * * /usr/local/bin/job.sh. Use absolute paths — cron runs with a minimal PATH.
  3. Save. cron picks the change up automatically; check the next run times above, in the time zone your server uses.
  4. Redirect output if you want to keep it: append >> /var/log/job.log 2>&1. The crontab line builder assembles the whole line.

FAQ

Is "0 */2 * * *" the same on every server?

The five-field form means the same thing in Linux cron, Kubernetes, GitHub Actions and most libraries. The clock it follows differs: a Linux server uses its own time zone (or CRON_TZ on cronie), GitHub Actions and AWS EventBridge rules use UTC unless a time zone is configured, and Kubernetes uses the controller's zone unless .spec.timeZone is set.

Why do Quartz and AWS need a "?"

Both require exactly one of day-of-month and day-of-week to be ?, meaning "no specific value"; they refuse an expression that restricts both, or leaves both as *.

How do I check it will run when I expect?

The widget above lists the next runs in the time zone you choose, and flags any run that lands in a daylight-saving gap or a repeated hour. For a whole crontab, paste it into the crontab viewer.

Other common schedules