Cron schedule · Updated

Cron every 2 hours: the 0 */2 * * * expression and its variants

The cron expression for every 2 hours, what each field means, odd-hour and working-hours variants, Jenkins and Quartz forms, and the every-minute trap to avoid.

To run a cron job every 2 hours, on the hour, use:

0 */2 * * *

It fires at 00:00, 02:00, 04:00 and every even hour up to 22:00: 12 times a day. In a crontab:

0 */2 * * * /usr/local/bin/refresh-cache.sh >> /var/log/refresh-cache.log 2>&1

What each field means

FieldValueMeaning
Minute0at minute 0
Hour*/2every 2nd hour, starting at 0
Day of month*every day
Month*every month
Day of week*every day of the week

Variants

ScheduleExpression
Every 2 hours, written out0 0,2,4,6,8,10,12,14,16,18,20,22 * * *
Every 2 hours on odd hours0 1-23/2 * * *
Every 2 hours at :3030 */2 * * *
Every 2 hours, 8:00 to 18:00 on weekdays0 8-18/2 * * 1-5
Jenkins, spreadH H/2 * * *
Jenkins, weekday working hoursH H(8-15)/2 * * 1-5
Quartz (seconds first)0 0 0/2 * * ?
Spring @Scheduled0 0 */2 * * *
AWS EventBridgerate(2 hours) or cron(0 0/2 * * ? *)

Platform notes

  • Linux crontab: even hours in the server's local time zone.
  • GitHub Actions: UTC by default; add timezone: "America/New_York" (any IANA name) under the cron entry to schedule in local time. Prefer a minute other than 0, such as 23 */2 * * *, since the top of the hour is when delays are most likely. See GitHub Actions cron.
  • Kubernetes CronJob: schedule: "0 */2 * * *" with .spec.timeZone if the hours matter.
  • Cloudflare Cron Triggers: UTC. A trigger that runs every hour or less often gets up to 15 minutes of CPU time on the Paid plan (as of October 2026).
  • Vercel: Pro or Enterprise only.
  • Jenkins: H H/2 * * * picks a stable minute and an hourly offset per job, so many jobs don't all start at the same moment. See Jenkins cron.

Common mistakes

  • *` /2 * `* runs every minute of every even hour, 720 times a day.
  • Steps that don't divide 24. 0 */5 * * * runs at 0, 5, 10, 15 and 20, then 0 again the next day: the last gap is 4 hours, because steps restart each day.
  • Forgetting UTC. A job meant for 8:00 local may land at 9:00 or 7:00 in a cloud scheduler.

Running an AI agent every 2 hours

A sensible pace for an agent that keeps a list fresh through the day, such as open support tickets or stale pull requests. The scheduled skills page shows how to run a Claude Code or Codex skill on any of these schedules.

Questions

Why does * */2 * * * run so often?

The * in the minute field means every minute, so it runs 60 times in each even hour. Put a single minute first: 0 */2 * * *.

How do I run every 2 hours on odd hours?

Use 0 1-23/2 * * * for 01:00, 03:00 and so on up to 23:00. The step counts from the start of the range, so starting the range at 1 shifts every run by an hour.

How do I run every 2 hours during working hours only?

Use 0 8-18/2 * * 1-5 for 8:00, 10:00, 12:00, 14:00, 16:00 and 18:00 on weekdays.

Does every 2 hours follow my time zone?

On a Linux server it follows the machine's time zone. GitHub Actions, Cloudflare and Vercel use UTC by default, so 0 */2 runs at even hours UTC, which may be odd hours where you are.

More cron schedules

All cron schedules

Know when your agents need you

Briefkin puts your Claude Code, Codex and Cursor sessions on one board: working, needs you, done or failed. Telegram pings you when one is waiting on you, and scheduled skills post their reports next to them.

Free during the open beta. No card.