Cron every minute
Expression: * * * * * — Every minute.
Every minute
Next 5 runs in UTC, from 1 Jan 2026 (example)
When to use it
Five asterisks is the most frequent schedule classic cron supports: the daemon wakes once a minute, compares the current time with every crontab line and starts each job whose fields all match. With no field restricted, the job fires 1,440 times a day. That suits health checks, queue consumers that poll a table, and watchdogs that restart a crashed process — work that is cheap and must react quickly. Anything that can take longer than sixty seconds will eventually overlap with its own previous run, so guard it with a lock.
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | * | every minute |
| Hour | * | every hour |
| Day of the month | * | every day of the month |
| Month | * | every month |
| Day of the week | * | every day of the week |
Real-world example
* * * * * flock -n /tmp/poll.lock /usr/local/bin/poll-queue >> /var/log/poll.log 2>&1
Polls a job queue every minute. flock -n skips the run if the previous one still holds the lock, and output is appended to a log instead of being mailed to root.
Variants
| Expression | Meaning |
|---|---|
* 9-17 * * 1-5 | Every minute from 09:00 to 17:59, on weekdays (Monday to Friday) — only during office hours on weekdays |
*/2 * * * * | Every 2 minutes — every other minute, half the load |
* * * * 1-5 | Every minute, on weekdays (Monday to Friday) — every minute, but not at weekends |
Pitfalls
- Cron cannot schedule below one minute. For every 30 seconds, add a second line that runs sleep 30 before the command, or use a systemd timer with OnUnitActiveSec=30s.
- Overlapping runs: wrap the command in flock -n so a slow run does not start a second copy that competes for the same rows or files.
- Log volume grows fast. Redirect output to a rotated file, otherwise cron mails every line to the local user and fills the mail spool.
Questions
Will a per-minute job overload a small VPS?
Rarely on its own, but startup cost adds up: interpreters, database connections and TLS handshakes repeat 1,440 times daily. A long-running daemon consuming a queue is often cheaper than restarting a script every minute.
Can cron run a job every 10 seconds?
Not directly. Add six crontab lines with sleep 0, sleep 10 … sleep 50 before the command, or switch to a systemd timer, a supervisor-managed loop, or a queue worker that blocks waiting for new messages.
Does the job start exactly at second zero?
Usually within a second or two, but heavily loaded machines delay it. Never assume precise timing; read the clock inside the script if accuracy matters.
The same schedule elsewhere
- GitHub Actions:
on: schedule: - cron: '* * * * *'. Always UTC, and runs can start several minutes late when runners are busy. - Kubernetes CronJob:
schedule: "* * * * *"; setconcurrencyPolicy: Forbidto prevent overlapping pods andtimeZoneif you need local time. - Cloudflare Workers:
crons = ["* * * * *"]under[triggers]in wrangler.toml, evaluated in UTC.
Before you deploy
Use absolute paths, because cron starts commands with a minimal PATH and without your shell profile. Make the job idempotent so a late or repeated run does no harm, log its exit code, and let a dead-man's-switch monitor alert you when an expected run never happens.