Tools › Cron examples › every hour

Cron expression for every hour

The cron expression for every hour is:

0 * * * *

What it does

Runs at the top of every hour (minute 0).

Field by field

FieldValueMeaning
Minute0exactly 0
Hour*every value
Day of month*every value
Month*every value
Day of week*every value

Typical uses

Log rotation, hourly aggregation, or clearing short-lived temp files.

Watch out for

Writing * * * * * with just the hour field changed is a classic mistake: * 3 * * * runs every minute during the 3am hour, 60 times.

Add it to your crontab

crontab -e, then add:

0 * * * * /path/to/command >> /var/log/myjob.log 2>&1

Related schedules

every minuteevery 5 minutesevery 10 minutesevery 15 minutesevery 30 minutesevery 2 hoursevery day at midnightevery day at 3amevery weekday at 9amevery 15 minutes during business hoursevery Mondayevery Sunday at midnighton weekendson the first day of every monthon the last day of the monthevery quartertwice a day
Copied to clipboard