Cron expression for every 5 minutes
The cron expression */5 * * * * runs a job every 5 minutes — at :00, :05, :10, :15 and so on through every hour. The standard 5-field syntax works in Linux crontab, Kubernetes CronJob, GitHub Actions and any scheduler that uses Unix cron. AWS EventBridge needs a 6-field form: cron(*/5 * * * ? *).
Quick reference
| Platform | Expression |
|---|---|
| Unix / Linux crontab | */5 * * * * |
| Kubernetes CronJob | */5 * * * * |
| GitHub Actions | */5 * * * * |
| AWS EventBridge Rules / Scheduler | cron(*/5 * * * ? *) |
| Quartz (Java) | 0 */5 * ? * * |
What does “every 5 minutes” actually mean?
The expression fires on absolute wall-clock minutes — :00, :05, :10, :15, :20, :25, :30, :35, :40, :45, :50, :55. Twelve runs per hour, 288 runs per day. It does NOT mean “5 minutes after the previous run finished”.
This matters when a run can take longer than the interval. If your job sometimes runs 7 minutes, you’ll have overlap. What happens then depends on the scheduler:
- Linux cron — starts a new process at :05 regardless. Two copies run concurrently.
- Kubernetes CronJob — depends on
concurrencyPolicy(defaultAllowlets them stack; setForbidto skip the new run,Replaceto kill the old one). - AWS EventBridge — invokes the target at :05 regardless. If the target is a Lambda with reserved concurrency 1, the second invocation throttles.
For sub-15-minute schedules this stacking risk is real — set concurrency policies explicitly.
Variations
| Schedule | Expression |
|---|---|
| Every 5 min, business hours only (9 AM – 5 PM) | */5 9-17 * * * |
| Every 5 min, weekdays only | */5 * * * 1-5 |
| Every 5 min, starting at :02 (offset by 2 min) | 2-59/5 * * * * |
| Every 5 min in AWS, weekdays only | cron(*/5 * ? * MON-FRI *) |
How do I use it on each platform?
Linux crontab:
*/5 * * * * /usr/local/bin/check-disk
Kubernetes CronJob:
apiVersion: batch/v1
kind: CronJob
metadata:
name: check-disk
spec:
schedule: "*/5 * * * *"
concurrencyPolicy: Forbid # important for short intervals
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: check
image: my-org/check-disk:1.0
AWS EventBridge (CLI):
aws events put-rule \
--name check-disk \
--schedule-expression "cron(*/5 * * * ? *)"
GitHub Actions:
on:
schedule:
- cron: '*/5 * * * *' # NOTE: GitHub min interval is actually 5 min
GitHub Actions enforces a 5-minute minimum, so this is the fastest schedule you can request. Anything more frequent is silently coalesced.
Common mistakes
Forgetting the trailing year in AWS. cron(*/5 * * * ?) is rejected — needs * at the end for year, even when you don’t constrain it.
Using * for both day-of-month and day-of-week in AWS. Replace exactly one with ?. The AWS parser refuses to accept both as *.
Assuming 5-minute schedules are “free” in serverless. EventBridge invokes are billed per million; Lambda invocations cost per request. 12/hour × 24h × 30 days = 8,640 invocations/month per rule. For 50 rules, that’s 432,000 invocations — measure the bill before scaling.
For other schedules see common cron schedules, or build a custom expression with the Cron Expression Builder.
Frequently asked questions
- Does `*/5 * * * *` run 5 minutes after the previous run finished?
- No — cron fires on absolute clock minutes (:00, :05, :10, :15, …) regardless of what the previous run is doing. If a run takes 6 minutes, the next one starts before the first finishes — depending on your scheduler, you may get a second concurrent process, the new run may queue, or it may be skipped entirely.
- How do I write "every 5 minutes" in AWS EventBridge?
- Wrap it in `cron()`, add the year field, and use `?` for one of dom/dow: `cron(*/5 * * * ? *)`. AWS does not accept the bare 5-field form.
- Will the job actually fire at exactly :05.000?
- No — there is typically 1–60 seconds of jitter depending on the platform. Linux cron polls every minute; Kubernetes uses the controller-manager loop (default ~10s); EventBridge has its own internal scheduler. If you need second-precision timing, cron is the wrong tool.
Need a different schedule?
Build cron expressions for Unix, Kubernetes and AWS — with a human-readable description and the next 5 run times.
Open the Cron Expression Builder →Related
Cron expression for every 15 minutes
The cron expression `*/15 * * * *` runs every 15 minutes — at :00, :15, :30, :45 — across Linux, Kubernetes, GitHub Actions and AWS.
Cron expression for every hour
The cron expression `0 * * * *` runs once per hour on the hour. Same syntax in Linux, Kubernetes and GitHub Actions; `cron(0 * * * ? *)` in AWS EventBridge.
Cron expression for daily at midnight
The cron expression `0 0 * * *` runs once daily at midnight. Watch the timezone — Kubernetes < 1.25 and AWS EventBridge default to UTC, not local time.
Cron expression for every weekday
The cron expression `0 9 * * 1-5` runs at 9 AM Monday through Friday. AWS uses `cron(0 9 ? * MON-FRI *)` because day-of-week numbering differs.
Cron expression for the first of every month
The cron expression `0 0 1 * *` runs at midnight on the 1st of every month. AWS uses `cron(0 0 1 * ? *)`.
Cron expression for every Sunday
The cron expression `0 0 * * 0` runs every Sunday at midnight in Unix cron. AWS uses `cron(0 0 ? * 1 *)` because Sunday is `1` in AWS, not `0`.