Sign up free

Cron · Every minute

Cron every minute

crontab schedule
* * * * *

Runs at the start of every minute, 1,440 times a day.

What it means

  1. minute*every minute
  2. hour*every hour
  3. day of month*every day
  4. month*every month
  5. day of week*every day of the week

Next runs

    Cron uses the server's time zone. Most servers run in UTC; check with date on the server.

    When to use it

    Every minute is the most frequent schedule standard cron allows. If a job needs to run more often, run it as a long-lived process or a loop inside the job. Before you choose it, check the job always finishes in under a minute: otherwise runs pile up on top of each other.

    Variations

    • * 9-17 * * 1-5: every minute from 09:00 to 17:59, Monday to Friday.
    • * * * * * sleep 30; + command: a common trick for every 30 seconds (two lines, one with the sleep).

    Common mistakes

    • Overlapping runs when the job takes longer than a minute. Use flock -n /tmp/job.lock to skip a run while the last one is still going.
    • Day of month and day of week together. If both are set (not *), standard cron runs when either matches, not both. 0 0 13 * 5 runs on every 13th and every Friday.
    • The job runs, but fails. Cron only starts the command. Exit codes and errors go to local mail or nowhere. Add && before the ping so a failed job doesn't ping.
    • Environment. Cron runs with a minimal PATH and no shell profile. Use full paths in the command.

    On other platforms

    • GitHub Actions (on: schedule): Same 5-field syntax, in UTC by default. The shortest interval is 5 minutes, and runs can start late under load. GitHub docs
    • Kubernetes CronJob: Same 5-field syntax. Set the time zone with .spec.timeZone (stable since v1.27), not with CRON_TZ in the schedule. Kubernetes docs
    • Vercel Cron Jobs: Hobby runs at most once a day, timed within the hour. Pro can run every minute. Vercel docs

    Know when it stops running

    crontab
    * * * * * /path/to/your-job.sh && curl -fsS -m 10 https://<your heartbeat URL> > /dev/null
    Expected every
    1 minute
    Grace
    2 minutes
    Monitor this job

    Heartbeat monitors are on Pro ($15 a month, or $12 billed yearly) and Agency. Free covers website, keyword, ping and port checks.

    Questions

    Can cron run every 30 seconds?

    Not directly. The smallest unit is a minute. Two entries, one with sleep 30, get you close.

    Does * * * * * run at second 0?

    Yes, at the start of each minute, give or take a second.

    How do I stop runs from overlapping?

    Wrap the command in flock -n.