curly{bits}

curlybits / Cron Generator / Cron Every Hour

Cron Job Every Hour

To run a cron job every hour, use 0 * * * *. The 0 in the minute field makes it run once at the start of every hour, 24 times a day. It's the same as @hourly.

Common schedules:

Next 10 runs

How to use the Cron Job Every Hour

  1. Copy 0 * * * * and put your command after it in your crontab (open it with crontab -e).
  2. Check the next run times below, in UTC or your server's time zone.
  3. Need something slightly different? Edit any field and the description updates as you type.

The crontab line

0 * * * * /path/to/your-script.sh >> /var/log/your-script.log 2>&1

The five fields are minute, hour, day of month, month and day of week. Redirecting output to a log file (>> … 2>&1) keeps errors you'd otherwise never see.

Good for

  • Hourly reports and log rotation
  • Refreshing search indexes or sitemaps
  • Sending digest emails

Variations

30 * * * *Every hour at half past
0 */2 * * *Every 2 hours, on the hour
0 9-17 * * 1-5Every hour during office hours on weekdays
@hourlyShortcut for 0 * * * *

Same schedule elsewhere

GitHub Actionson: schedule: - cron: '0 * * * *' (always UTC)
Kubernetesspec.schedule: "0 * * * *" in a CronJob
Vercel"crons": [{"path": "/api/job", "schedule": "0 * * * *"}] in vercel.json

Frequently asked questions

Why does * * * * * not mean every hour?

An asterisk in the minute field means every minute. Put 0 there to run once per hour.

What time zone does it use?

The time zone of the machine or service running cron, which is usually UTC on servers and cloud schedulers. GitHub Actions always uses UTC.