Cron Expression for Every 2 Hours

0 */2 * * *

0 */2 * * * runs at the top of every even hour: 00:00, 02:00, … 22:00. The minute field must be pinned to 0 — leaving it as * fires the job every minute of every even hour.

Next runs, in your timezone

 

Even hours vs odd hours

*/2 in the hour field expands from 0, so runs land on even hours. For odd hours, give the step a range that starts at 1.

0 */2 * * *    # 00:00, 02:00, 04:00, …
0 1-23/2 * * * # 01:00, 03:00, 05:00, …

The forgotten minute field

* */2 * * * matches every minute of every even hour — 720 runs a day instead of 12. It is the most common mistake with hour-step expressions; the minute field always needs a concrete value.

0 */2 * * * /path/to/job.sh >> /var/log/myjob.log 2>&1

Equivalent expressions

  • 0 0,2,4,6,8,10,12,14,16,18,20,22 * * *explicit list — identical schedule
  • 0 1-23/2 * * *the odd-hours counterpart

Run a SQL query on this schedule

If the job behind this schedule is a database query, you can skip the server and the crontab: SaturnSQL runs saved SQL queries on a cron expression — this exact syntax, with a real timezone field — and delivers the results to Google Sheets or Slack. Minimum interval 5 minutes.