Sign up free

Cron · Every hour

Cron every hour

crontab schedule
0 * * * *

Runs at minute 0 of every hour, 24 times a day. Same as @hourly.

What it means

  1. minute0minute 0
  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

    Hourly is the classic schedule for log rotation, rollups and certificate checks. Most systems start lots of hourly jobs on :00, so offsetting yours by a few minutes is an easy way to avoid the spike.

    Variations

    • @hourly: the same as 0 * * * *.
    • 17 * * * *: hourly at :17, off the busy :00.
    • 0 9-17 * * 1-5: hourly in working hours on weekdays.

    Common mistakes

    • * * * * * (every minute) instead of 0 * * * *. The first field must be 0.
    • 0 */1 * * * works, but is just 0 * * * * written longer.
    • 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
    0 * * * * /path/to/your-job.sh && curl -fsS -m 10 https://<your heartbeat URL> > /dev/null
    Expected every
    1 hour
    Grace
    10 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

    What's the cron for every hour?

    0 * * * * or @hourly.

    Why does my hourly job run every minute?

    The minute field is *. Set it to 0.

    How do I run it at a different minute?

    Change the first field, e.g. 30 * * * *.