Cron every 2 hours
Every 2 hours in cron is 0 */2 * * *, or 0 0 */2 * * ? in Quartz and Spring, on even hours; next runs are calculated in your browser.
0 */2 * * *
0 0 */2 * * ?
cron(0 0/2 * * ? *)
Read by our parser as: Every 2 hours (12 AM, 2 AM, 4 AM, 6 AM, ...), on the hour. Open in the cron checker
Next 10 runs
Calculating in your browser...
- 1
- 2
- 3
At a glance
- Accepts
- Nothing to enter - the schedule is preset on the page
- Outputs
- The expression in Unix, Quartz/Spring and AWS form, plus its next 10 run times
- Where it runs
- Entirely in your browser, on your device
- What leaves your device
- Nothing - what you type stays in this tab
- Limits
- Run times use your browser's timezone or UTC; real schedulers can start a run late
- Account
- Not required - there is no sign-up
- Price
- Free, with no watermark and no usage cap
- Made by
- Visrut
What it means
0 */2 * * * runs at minute 0 of every even hour: 00:00, 02:00, 04:00 ... 22:00, twelve times a day. The step counts from hour 0, so it always lands on even hours. Crontab(5) uses this exact case to explain steps: 0-23/2 is "every other hour".
When this is the right schedule
Use it when a task is too heavy to run hourly but should still happen several times a day, like a search reindex or pulling a large report.
When to pick something else
Look elsewhere when you need it relative to when something started (cron always uses clock hours), or you want odd hours: then use 0 1-23/2 * * *.
Things to watch
Odd hours
0 1-23/2 * * * starts at 1 and steps by 2: 01:00, 03:00 ... 23:00. Quartz, Spring and AWS also accept the shorter 1/2.
Whose midnight?
Even hours in UTC are odd hours in a timezone with an odd offset, such as UTC-5. GitHub Actions and Kubernetes (without timeZone) don't use your laptop's timezone. Toggle UTC on the run list to see where the runs really land.
Steps that don't divide 24
2 divides 24, so the spacing never breaks. */5 in the hour field gives 0, 5, 10, 15, 20 and then a 4-hour gap to midnight; */7 gives 0, 7, 14, 21 and a 3-hour gap.
Frequently asked questions
Is 0 */2 * * * the same as 0 0,2,4,6,8,10,12,14,16,18,20,22 * * *?
Yes. The step form is just shorter.
Why did my every-2-hours job run at 1 AM?
Usually a timezone difference: the schedule is evaluated in UTC (or the server's zone) and you're reading it in a zone with an odd-hour offset.