⏱OpsTools

Cron Expression for Every 2 Hours

0 */2 * * *→Runs every 2 hours at minute 0
0
Minute
0–59
*/2
Hour
0–23
*
Day
1–31
*
Month
1–12
*
Weekday
0–7

Quick Examples

How It Works

The expression 0 */2 * * * runs at minute 0 of every even hour: 00:00, 02:00, 04:00 … 22:00. The step */2 is applied to the hour field. This is useful for medium-frequency batch jobs that would be wasteful to run every hour but need more than a daily cadence.

Common Use Cases

  • 1Database backup snapshots
  • 2Sitemap regeneration for medium-traffic sites
  • 3Aggregating IoT sensor data

Linux Crontab Example

0 */2 * * * pg_dump mydb > /backups/mydb_$(date +\%H).sql

Add this line to your crontab with crontab -e

Need a custom schedule?

Build your own cron expression visually with our generator.

Open Generator →