What is Interval?

The fixed time gap between consecutive executions of a scheduled job.

Definition

An interval is the recurring time period between one execution and the next. A 15-minute interval means the job runs at :00, :15, :30, and :45 past each hour. Intervals in cron are expressed using the step operator (/) โ€” for example, */15 in the minute field. Unlike fixed-delay scheduling, cron intervals are clock-aligned: a "every 15 minutes" job starts at the top of the hour, not 15 minutes after creation.

๐Ÿ’ก

Simple Analogy

Like a metronome ticking at a steady beat โ€” the interval is the gap between ticks, and each tick triggers your job to run.

Why It Matters

Choosing the right interval balances responsiveness against resource consumption. A monitoring ping every minute catches outages quickly but generates 1,440 requests per day. Every 5 minutes reduces that to 288 while still detecting issues within 5 minutes. Understanding intervals helps you make this tradeoff consciously.

How to Verify

Check your cron expression's step values. "*/5 * * * *" is a 5-minute interval. Use the Cron Explainer to see consecutive run times and verify the gap matches your intent. In CronJobPro, the job detail page shows the interval between runs.

โš ๏ธ

Common Mistakes

Confusing "every 15 minutes" with "15 minutes after the job finishes." Cron intervals are clock-aligned, not completion-based. Setting an interval shorter than the job's execution time, causing overlapping runs. Using "*/7" and expecting runs exactly 7 minutes apart (it resets each hour: :00, :07, :14, :21, :28, :35, :42, :49, :56, then :00 again โ€” a 4-minute gap).

โœ…

Best Practices

Choose intervals that divide evenly into 60 for the minute field (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) to get consistent spacing. If your job takes longer than the interval, enable concurrency protection to prevent overlaps. Monitor actual execution times to ensure your interval is appropriate.

Cron Expression Explainer

Explain a cron expression

Try it free โ†’

Frequently Asked Questions

What is Interval?

An interval is the recurring time period between one execution and the next. A 15-minute interval means the job runs at :00, :15, :30, and :45 past each hour. Intervals in cron are expressed using the step operator (/) โ€” for example, */15 in the minute field. Unlike fixed-delay scheduling, cron intervals are clock-aligned: a "every 15 minutes" job starts at the top of the hour, not 15 minutes after creation.

Why does Interval matter for cron jobs?

Choosing the right interval balances responsiveness against resource consumption. A monitoring ping every minute catches outages quickly but generates 1,440 requests per day. Every 5 minutes reduces that to 288 while still detecting issues within 5 minutes. Understanding intervals helps you make this tradeoff consciously.

What are best practices for Interval?

Choose intervals that divide evenly into 60 for the minute field (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) to get consistent spacing. If your job takes longer than the interval, enable concurrency protection to prevent overlaps. Monitor actual execution times to ensure your interval is appropriate.

Related Terms