Field-by-Field Breakdown of `* * * * *`
| Position | Field Name | Allowed Values | Value in `* * * * *` | Evaluation Meaning |
|---|---|---|---|---|
| 1 | Minute | 0 – 59 | * | * (Every minute: 0-59) |
| 2 | Hour | 0 – 23 | * | * (Every hour: 0-23) |
| 3 | Day of Month | 1 – 31 | * | * (Every day of month: 1-31) |
| 4 | Month | 1 – 12 | * | * (Every month: 1-12) |
| 5 | Day of Week | 0 – 6 (Sun-Sat) | * | * (Every day of week: 0-6) |
Understanding Minute-Level Cron Resolution
In POSIX standard Unix cron, the minute is the smallest unit of scheduling granularity. The five-asterisk syntax `* * * * *` matches every minute of every hour, resulting in exactly 1,440 executions per calendar day.
Standard Unix cron does not support sub-minute intervals (such as running every 30 seconds). Scheduling sub-minute tasks requires running a background daemon, a systemd timer with `OnUnitActiveSec=30s`, or a crontab sleep hack (e.g. running the script, sleeping 30 seconds, and running again).
Executing tasks every minute places continuous load on system processes. Every invocation forks a shell process, reads environment paths, and writes audit logs. Scripts running at this frequency must complete in under 5 to 10 seconds to avoid CPU exhaustion.
Common Production Scenarios for `* * * * *`
High-Frequency Metric Collection
Gathers system hardware metrics (CPU, RAM, swap, network I/O) and dispatches telemetry to Prometheus Node Exporter or Datadog.
/usr/local/bin/collect-metrics.sh > /dev/null 2>&1Immediate Email Queue Dispatcher
Flushes transactional email queues in e-commerce applications to maintain instant delivery for password resets and order confirmations.
/usr/bin/python3 /opt/mailer/dispatch_queue.pyServer Liveness & Process Watchdog
Checks if a mission-critical daemon (like Nginx or Postgres) has crashed and triggers an immediate service restart if unresponsive.
pgrep nginx > /dev/null || systemctl restart nginxProduction Gotchas When Running `* * * * *`
- Sub-minute limitation: Cron cannot fire every 10 or 30 seconds natively. Use systemd timers if sub-minute frequency is required.
- High fork overhead: 1,440 process forks per day can cause CPU churn on small 512MB RAM VPS instances. Prefer persistent daemon loops where possible.
- Log spam: Never omit output redirection on every-minute jobs. Unredirected output sends 1,440 local emails daily to the root user.
Frequently Asked Questions About `* * * * *`
Can cron run jobs every 30 seconds?
No, POSIX cron has a minimum resolution of 1 minute. To achieve 30-second execution, configure a systemd timer, run a persistent loop script with `sleep 30`, or define two cron entries where the second entry begins with `sleep 30`.
Why is `* * * * *` the default cron expression?
Five asterisks represents the universal wildcard in cron syntax. Because each field matches all possible values (minute, hour, day, month, weekday), the daemon executes the task on every cycle.
How do I silence output for a 1-minute cron job?
Append `>/dev/null 2>&1` to the end of your command in the crontab line: `* * * * * /path/to/script.sh >/dev/null 2>&1`. This discards standard output and errors, preventing local mail spam.