⚡
fasttools.me
Run Cron Job Every Hour (0 * * * *)
Top of the Hour • 24 Executions Daily

Run Cron Job Every Hour (0 * * * *)

Configure cron tasks running every hour at minute zero (0 * * * *). Visual syntax breakdown, next execution timetable, and server best practices.

Direct Answer Definition

To run a cron job every hour in Linux, use the expression `0 * * * *`. The `0` in the first field specifies that the task must fire exactly at minute zero (the top of each hour), while the four subsequent asterisks allow execution during every hour of every day.

POSIX Cron Expression (5-Field)
Valid Syntax
Natural Language Schedule

Every hour, at minute 0

Standard Schedule PresetsClick to load

Interactive 5-Field Workbench

Adjust individual cron segments in real time with instant two-way synchronization.

1. Minute0
0 – 59
2. Hour*
0 – 23 (24h)
3. Day of Month*
1 – 31
4. Month*
1 – 12 (Jan – Dec)
Select Month
5. Day of Week*
0 – 6 (Sun – Sat)
Select Day

Next 5 Scheduled Executions

Real-time schedule timetable projected forward from current timestamp.

12026-10-08 10:00:00 UTC
in 57 min
22026-10-08 11:00:00 UTC
in 1h 57m
32026-10-08 12:00:00 UTC
in 2h 57m
42026-10-08 13:00:00 UTC
in 3h 57m
52026-10-08 14:00:00 UTC
in 4h 57m

Crontab Command Snippet

Enter your executable command or script path to generate the full crontab configuration line.

Ready to paste in `crontab -e`0 * * * * curl -fsS https://example.com/cron-job
Runs in system timezone or explicit TZ variablePOSIX Spec
Advertisement
Sponsored Developer Space
Cron Field Syntax Mapping

Field-by-Field Breakdown of `0 * * * *`

PositionField NameAllowed ValuesValue in `0 * * * *`Evaluation Meaning
1Minute0 – 5900 (At minute 0 of the hour)
2Hour0 – 23** (Every hour: 00:00 through 23:00)
3Day of Month1 – 31** (Every day of the month: 1-31)
4Month1 – 12** (Every month: 1-12)
5Day of Week0 – 6 (Sun-Sat)** (Every day of the week: 0-6)
Technical Engineering Analysis

The Critical Difference Between `0 * * * *` and `* * * * *`

A common mistake among junior sysadmins is writing `* 1 * * *` or `* * * * *` when intending an hourly schedule. An asterisk in the minute field means 'every minute', not 'once per hour'. Specifying `0 * * * *` locks execution strictly to the top of the hour: 01:00, 02:00, 03:00, and so on.

Linux systems also support the special string `@hourly`, which is functionally identical to `0 * * * *`. However, explicit numeric notation (`0 * * * *`) is preferred for portability across BSD, Solaris, and busybox environments.

Because thousands of automated server scripts default to `0 * * * *`, shared hosting platforms and public APIs experience massive CPU and network traffic spikes at minute :00. In production, staggering jobs to non-zero minutes (such as `17 * * * *` or `43 * * * *`) prevents resource contention.

Real-World Server Implementations

Common Production Scenarios for `0 * * * *`

Case 01

Hourly Database WAL & Log Rotation

Compresses hourly web server access logs or writes database transaction log snapshots to cold S3 storage.

/usr/sbin/logrotate /etc/logrotate.d/hourly-nginx
Case 02

Currency Exchange Rate & Stock Ticker Sync

Queries external financial APIs (ECB, Forex) to cache updated exchange rates in memory for consumer pricing tables.

/usr/bin/node /opt/rates/sync-forex.js
Case 03

Expired User Session Cleanup

Scans Redis or database tables to invalidate expired authentication tokens and prune stale cart reservations.

/usr/bin/php /var/www/artisan auth:prune-tokens
Operational Traps & Failure Modes

Production Gotchas When Running `0 * * * *`

  • Minute Zero Contention: Scheduling heavy tasks at `0 * * * *` competes with system cron maintenance jobs. Choose an offset like `7 * * * *` to distribute load.
  • Timezone Traps: Cron runs in the server's local system time unless an explicit `TZ` variable is declared at the top of the crontab file.
  • Long-running Jobs: If an hourly job takes 65 minutes, the next run will spawn while the first is active unless isolated with locking.

Frequently Asked Questions About `0 * * * *`

What is the difference between `0 * * * *` and `* 1 * * *`?

`0 * * * *` runs once every hour at minute zero (24 times daily). `* 1 * * *` runs every single minute during 1:00 AM to 1:59 AM (60 times in one hour, and never during other hours).

Can I use `@hourly` instead of `0 * * * *`?

Yes, modern Linux distributions (Vixie Cron and Cronie) support the `@hourly` shortcut, which is an exact alias for `0 * * * *`.

How do I run a job every hour at minute 15 instead of minute 0?

Set the minute field to `15`: `15 * * * * /path/to/script.sh`. The job will trigger at 01:15, 02:15, 03:15, avoiding peak top-of-hour server contention.

Related Cron Schedule Generators