⚡
fasttools.me
Run Cron Job Every 5 Minutes (*/5 * * * *)
Step Value Notation • 288 Executions Daily

Run Cron Job Every 5 Minutes (*/5 * * * *)

Generate and validate the cron expression for running jobs every 5 minutes (*/5 * * * *). Human-readable schedule, next execution times, and syntax guide.

Direct Answer Definition

To run a cron job every 5 minutes in Linux, use the expression `*/5 * * * *`. The forward slash represents a step value in the minute field, instructing the cron daemon to execute the task at minute 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55 across every hour of every day.

POSIX Cron Expression (5-Field)
Valid Syntax
Natural Language Schedule

Every 5 minutes

Standard Schedule PresetsClick to load

Interactive 5-Field Workbench

Adjust individual cron segments in real time with instant two-way synchronization.

1. Minute*/5
0 – 59
2. Hour*
0 – 23 (24h)
3. Day of Month*
1 – 31
4. Month*
1 – 12 (Jan – Dec)
Select Month
5. Day of Week*
0 – 6 (Sun – Sat)
Select Day

Next 5 Scheduled Executions

Real-time schedule timetable projected forward from current timestamp.

12026-10-08 09:05:00 UTC
in 2 min
22026-10-08 09:10:00 UTC
in 7 min
32026-10-08 09:15:00 UTC
in 12 min
42026-10-08 09:20:00 UTC
in 17 min
52026-10-08 09:25:00 UTC
in 22 min

Crontab Command Snippet

Enter your executable command or script path to generate the full crontab configuration line.

Ready to paste in `crontab -e`*/5 * * * * curl -fsS https://example.com/cron-job
Runs in system timezone or explicit TZ variablePOSIX Spec
Advertisement
Sponsored Developer Space
Cron Field Syntax Mapping

Field-by-Field Breakdown of `*/5 * * * *`

PositionField NameAllowed ValuesValue in `*/5 * * * *`Evaluation Meaning
1Minute0 – 59*/5*/5 (Every 5th minute: 0, 5, 10... 55)
2Hour0 – 23** (Every hour: 0-23)
3Day of Month1 – 31** (Every day of the month: 1-31)
4Month1 – 12** (Every month: 1-12)
5Day of Week0 – 6 (Sun-Sat)** (Every day of the week: 0-6)
Technical Engineering Analysis

How Step Values Work in POSIX Cron

In standard POSIX cron syntax, the expression `*/5` in the minute position is a step specification. It evaluates the full wildcard range (0 through 59) and fires only when the minute value modulo 5 equals zero. This ensures execution begins precisely at the top of the hour (:00) rather than offsetting from server startup time.

A common alternative is the explicit comma-delimited list `0,5,10,15,20,25,30,35,40,45,50,55 * * * *`. While functionally identical, step notation is universally preferred in production sysadmin environments because it reduces human configuration errors and produces compact, readable crontab files.

Because `*/5 * * * *` triggers 12 times per hour (288 times in a 24-hour cycle), tasks scheduled on this cadence must be lightweight and idempotent. Any process exceeding a 300-second execution window will overlap with the subsequent invocation unless protected by a lockfile mechanism like `flock`.

Real-World Server Implementations

Common Production Scenarios for `*/5 * * * *`

Case 01

API Health Check & Heartbeat Ping

Monitors upstream microservices or publishes health check metrics to uptime services like Better Stack or Pingdom.

curl -fsS --retry 3 https://api.fasttools.me/health > /dev/null
Case 02

Message Queue & Task Worker Polling

Checks Redis or RabbitMQ dead-letter queues for orphaned consumer jobs requiring automated retry or alerting.

/usr/bin/php /var/www/artisan queue:restart
Case 03

Lightweight SSL / DNS Cache Warming

Pre-warms edge CDN caching proxies to ensure fast TTFB on frequently requested programmatic API endpoints.

/usr/local/bin/warm-cache.sh >> /var/log/warm-cache.log 2>&1
Operational Traps & Failure Modes

Production Gotchas When Running `*/5 * * * *`

  • Job Overlap: If the task takes longer than 5 minutes, concurrent instances will spawn simultaneously. Use `flock -n /var/lock/myjob.lock /path/to/script.sh` to prevent stampeding.
  • Time Drift: Cron checks scheduled tasks at second 00 of each minute. Heavy system load can delay invocation by 1-3 seconds.
  • Log File Growth: At 288 executions daily, logging standard output without rotation will fill disk space rapidly. Always pipe to `logrotate` or write only errors.

Frequently Asked Questions About `*/5 * * * *`

Does `*/5 * * * *` run at minute 0?

Yes. Step notation always evaluates starting from the minimum valid boundary of the field (minute 0). The schedule triggers at :00, :05, :10, :15, :20, :25, :30, :35, :40, :45, :50, and :55.

What is the difference between `*/5 * * * *` and `5 * * * *`?

`*/5 * * * *` runs 12 times per hour (every 5 minutes). In contrast, `5 * * * *` runs only once per hour, exactly at minute 5 (e.g. 01:05, 02:05, 03:05).

How do I prevent a 5-minute cron job from overlapping if it runs slow?

Wrap your crontab command with the Linux utility `flock`. For example: `*/5 * * * * /usr/bin/flock -n /tmp/job.lock /usr/local/bin/my-task.sh`. If the previous run is still active, subsequent runs exit immediately.

Related Cron Schedule Generators