T
ToolPrime

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

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

node-cron (Node.js)

import cron from 'node-cron'

// At the start of every hour
cron.schedule('0 * * * *', () => {
  console.log('Running Every Hour')
})

Spring (@Scheduled, Java)

// At the start of every hour
@Scheduled(cron = "0 0 * * * *")
public void run() {
    // your task
}

Spring cron has 6 fields (a leading seconds field), so a 0 is prepended to the standard 5-field expression.

Tips

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.

Related Cron Expressions

Related Tools