Cron Every 5 Minutes

Schedule a cron job every 5 minutes with */5 * * * *. Learn the syntax, see examples for Unix, Quartz, AWS, and get next run times.

The cron expression */5 * * * * uses the step operator (*/5) in the minute field to run a command every 5 minutes. It triggers at minute 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 of every hour, producing 288 executions per day. This schedule is ideal for tasks that need frequent but not continuous execution: API health checks, data synchronization between systems, queue polling, cache warming, or metrics collection. The step operator */5 means "every 5th value starting from 0," which is why it fires at minute 0 (the top of the hour) as the first trigger. For Quartz Scheduler, use 0 */5 * ? * * (add seconds field at the start, and ? for day-of-week). For AWS EventBridge, use rate(5 minutes) or cron(0/5 * ? * * *). For Kubernetes CronJob, the standard 5-field format works: schedule: "*/5 * * * *". On Vercel Cron, add to vercel.json: { "crons": [{ "path": "/api/task", "schedule": "*/5 * * * *" }] }. A common mistake is confusing */5 with 0-59/5. They are equivalent — both trigger at the same times. Another pitfall: if your job takes longer than 5 minutes, executions will overlap. Use a lock file (flock) or a queue system to prevent concurrent runs. If you need this schedule only during business hours, combine it with an hour range: */5 9-17 * * 1-5 runs every 5 minutes from 9 AM to 5 PM on weekdays only.

FAQ

  • What does the cron expression */5 * * * * mean?

    The expression */5 * * * * means: at minute */5, hour *, day-of-month *, month *, day-of-week *. Each field in the cron expression controls a different time component: minute, hour, day of month, month, and day of week.

  • How do I add */5 * * * * to my crontab?

    Run crontab -e in your terminal to open your crontab editor. Add a new line: */5 * * * * /path/to/your/script.sh. Save and exit. Verify with crontab -l. Make sure your script is executable (chmod +x script.sh) and uses full paths for all commands.

  • What is the equivalent of */5 * * * * on Quartz / AWS / Kubernetes?

    Quartz Scheduler: */5 * * * ?. AWS EventBridge: cron(*/5 * ? * * *). Kubernetes CronJob: schedule: "*/5 * * * *" (standard 5-field format). Each platform has slight syntax differences — use our dialect switcher above to get the exact expression.

  • Is running a cron every 5 minutes too frequent?

    It depends on your task. For monitoring and health checks, every 5 minutes is standard. For data processing, consider whether the data changes fast enough to warrant this frequency. Key rule: each execution must complete within 5 minutes to avoid overlap. Use flock or a similar lock mechanism for safety.

  • What are common mistakes when using */5 * * * *?

    Common pitfalls: (1) Cron uses a minimal PATH — always use full paths to commands and scripts. (2) Percent signs (%) must be escaped with backslash in crontab. (3) Cron runs in the system timezone — set CRON_TZ=UTC at the top of your crontab for consistent UTC scheduling. (4) Redirect output to prevent email spam: */5 * * * * /path/command >> /var/log/myjob.log 2>&1. (5) Test your cron expression with crontab.guru or our validator above before deploying.

  • Are there alternative cron expressions for this schedule?

    For less frequent checks, try */10 * * * * (every 10 minutes) or */15 * * * * (every 15 minutes). To restrict to business hours: */5 9-17 * * 1-5.

Platform Equivalents for */5 * * * *

The cron expression */5 * * * * has different syntax on various scheduling platforms. Here is the equivalent expression for each:

PlatformExpression
Unix / Linux crontab*/5 * * * *
Quartz Scheduler (Java)*/5 * * * ?
AWS EventBridgecron(*/5 * ? * * *)
Kubernetes CronJob*/5 * * * *
Vercel Cron*/5 * * * *
GitHub Actions*/5 * * * * (UTC)

Key differences across platforms: Quartz uses 7 fields starting with seconds and supports L (last) and W (weekday) modifiers. AWS EventBridge requires a 6th year field and uses ? instead of * in day fields when the other day field is specified. Kubernetes uses standard 5-field Unix cron. Vercel Cron uses the same format but schedules are defined in vercel.json. GitHub Actions uses standard cron but runs in UTC timezone only, so adjust the hour field for your local timezone offset.

Getting Started with Cron

Follow these tips when setting up cron jobs in production:

  • Always use full paths to commands and scripts in your crontab, since cron runs with a minimal PATH environment (often just /usr/bin:/bin).
  • Redirect output to log files: command >> /var/log/myjob.log 2>&1 to capture errors and prevent cron from emailing you every execution.
  • Test your cron expression before deploying — use our validator above or crontab.guru to verify the schedule fires when you expect.
  • Set MAILTO="" at the top of your crontab to disable email notifications, or set MAILTO=your@email.com to receive error alerts.
  • Use flock or a PID file to prevent overlapping executions for jobs that may take longer than their scheduled interval.