Cron Every 2 Minutes
The */2 in the minute field means "every 2nd minute." The job runs at minutes 0, 2, 4, 6, … 58 — thirty times per hour.
Cron Expression
*/2 * * * *Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | */2 | Every 2nd minute (0, 2, 4, … 58) |
| Hour | * | Every hour (0-23) |
| Day of Month | * | Every day (1-31) |
| Month | * | Every month (1-12) |
| Day of Week | * | Every day of the week (0-6) |
Variations
*/2 * * * *Every 2 minutes, 24/7*/2 9-17 * * *Every 2 minutes during business hours (9 AM – 5 PM)*/2 * * * 1-5Every 2 minutes on weekdays onlyCommon Use Cases
- Near-real-time monitoring and health checks
- Frequent queue and job processing
- Short-interval data synchronization
Tips & Best Practices
Make sure the job finishes in well under 2 minutes to avoid overlapping runs.
If you do not need this frequency, every 5 minutes cuts server load by more than half.
Use a lock file or flock to prevent a slow run from stacking on the next.