Skip to content

Cron for Hourly & Midnight Jobs

Published July 16, 2026By Samson PG

“Every 5 minutes” is common. “Every hour” and “every day at midnight” are the next two expressions people look up when wiring backups and reports.

Cron schedules commands with five (or six) fields. After “every 5 minutes,” the next searches are usually every hour and every day at midnight.

Every hour

Standard 5-field form (minute hour day month weekday):

0 * * * *

Meaning: at minute 0 of every hour — 1:00, 2:00, 3:00, …

Variants:

Goal Expression
Every hour on the hour 0 * * * *
Every hour at :15 15 * * * *
Every 2 hours 0 */2 * * *

Every day at midnight

0 0 * * *

Minute 0, hour 0 (midnight in the scheduler’s timezone), every day.

Goal Expression
Daily at 00:00 0 0 * * *
Daily at 09:30 30 9 * * *
Weekdays at 09:00 0 9 * * 1-5

Timezone traps

Cron does not magically use “your laptop timezone.” It uses whatever the host or SaaS (GitHub Actions, Cloud Scheduler, Vercel cron) defines as UTC or local. A “midnight” job that fires at 5:30 AM is almost always a timezone mismatch — not a broken expression.

Check before you ship

  1. Write the expression.
  2. Explain it in plain English.
  3. Preview the next few run times.
  4. Confirm the platform’s timezone docs.

Use TryDevSnip Cron Helper

TryDevSnip Cron Helper explains expressions and shows upcoming runs in your browser — no account, nothing uploaded.

Also see: every 5 minutes cron.

FAQ

Is @hourly the same as 0 * * * *?

On many systems yes (@hourly). Prefer the numeric form when a platform does not support nicknames.

Does day-of-month + day-of-week both set mean AND or OR?

Classic Vixie cron treats that combo as OR (either matches). Check your engine’s docs.

Can I test cron without waiting an hour?

Yes — use a helper that lists next run times, or temporarily use a denser schedule in staging.

← More from the blog