Cron Expression for Every Hour
Run a cron job every hour at minute 0 using the expression 0 * * * *. One of the most common cron schedules for periodic background tasks.
Expression
0 * * * * At the start of every hour
Use Cases
- • Generating hourly analytics reports
- • Rotating or compressing log files
- • Sending hourly status update notifications
- • Running scheduled data backups
Code Examples
Crontab
# At the start of every hour
0 * * * * /path/to/your/script.sh GitHub Actions
name: Scheduled Job
on:
schedule:
- cron: '0 * * * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Running Every Hour" systemd Timer
[Unit]
Description=Every Hour timer
[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true
[Install]
WantedBy=timers.target Tips
- ✓ Specify 0 in the minute field to run at the top of each hour
- ✓ Using * in the minute field would run every minute instead
- ✓ Consider offsetting to a random minute to avoid "thundering herd"
- ✓ Runs 24 times per day, 168 times per week
Frequently Asked Questions
Why 0 * * * * and not * * * * * for hourly?
0 * * * * runs once at minute 0 of every hour. * * * * * runs every minute. The 0 in the minute field limits execution to the start of each hour.
Can I run hourly at minute 30 instead?
Yes, use 30 * * * * to run at the 30th minute of every hour instead of at minute 0.