Cheat Sheets · Cron Cheat Sheet · Cron Every 4 Hours — Crontab Example

Cron Every 4 Hours — Crontab Example

0 */4 * * *

Runs 6 times a day — at 00:00, 04:00, 08:00, 12:00, 16:00, 20:00.

Field by field

FieldValueMeaning
Minute0At minute 0
Hour*/4Every 4th hour (0, 4, 8, 12, 16, 20)
Day of month*Every day
Month*Every month
Day of week*Every day of the week

A 4-hour cadence evenly splits a 24-hour day into 6 windows. It is standard for data synchronization, search index updates, and SSL certificate expiration checks.

0 */4 * * * /usr/local/bin/refresh-feed.sh

Related schedules

FAQ

Can I start at 02:00 instead of 00:00?
Yes — use 0 2-23/4 * * * to fire at 02:00, 06:00, 10:00, 14:00, 18:00, 22:00.

Does cron handle daylight saving changes here?
If your server runs on local time, DST transition days may duplicate or skip one run. Always use UTC on server infrastructure.

How do I log output?
Append >> /var/log/myjob.log 2>&1 to redirect both standard output and error output.

Stop memorizing — build it interactively

Try this schedule in the Cron Editor

Full reference: Cron Cheat Sheet