Cron expression for every 4 hours
0 */4 * * * runs six times a day on the clock: 00:00, 04:00, 08:00, 12:00, 16:00 and 20:00.
Runs entirely in your browser. Nothing you paste is sent to our server, stored or logged.
0 */4 * * *
When it runs next
What it means
Because 4 divides 24 cleanly, */4 in the hour field spaces runs four hours apart across midnight without drifting from day to day. Adding 0 in the minute column keeps the job to a single trigger at the top of each matching hour.
Teams reach for four-hour schedules for incremental database snapshots, billing syncs and third-party API imports where hourly calls would hit rate limits.
Common variations
| Expression | Runs |
|---|---|
30 */4 * * * | At half past the hour every 4 hours |
0 2,6,10,14,18,22 * * * | Offset 4-hour cycle starting at 02:00 |
0 */4 * * 1-5 | Every 4 hours Monday through Friday |
As a crontab line
Add the command you want to run after the five fields, then save it with
crontab -e:
0 */4 * * * /path/to/script.sh
Other common schedules
-
Every minute
* * * * * -
Every 5 minutes
*/5 * * * * -
Every 10 minutes
*/10 * * * * -
Every 15 minutes
*/15 * * * * -
Every 30 minutes
*/30 * * * * -
Every hour
0 * * * * -
Every 2 hours
0 */2 * * * -
Every day at midnight
0 0 * * * -
Every weekday
0 9 * * 1-5 -
Every week
0 0 * * 0 -
Every month
0 0 1 * * -
Every 2 minutes
*/2 * * * * -
Every 3 hours
0 */3 * * * -
Every 6 hours
0 */6 * * * -
Every 12 hours
0 */12 * * * -
Every day at noon
0 12 * * * -
Every year
0 0 1 1 *