Cron job every 6 hours
To run a cron job every 6 hours, use 0 */6 * * *. Every 6 hours, on the hour.
- Free
- No Sign-Up
- Runs in Your Browser
Runs
Next Runs
Your time zoneCrontab Line
0 */6 * * * /path/to/job.sh >> /var/log/cron-job.log 2>&1
Cron Expression Generator
0 */6 * * * explained
Steps like */6 line up with the clock, not with the moment you saved the crontab: */15 runs at :00, :15, :30 and :45 every hour. Cron has no way to say "15 minutes after the last run".
If a run can take longer than the gap between runs, stop runs overlapping with flock: 0 */6 * * * flock -n /tmp/job.lock /path/to/job.sh. A second copy then exits straight away instead of piling up.
Cron runs jobs with a minimal environment: use full paths, and send output to a log file (>> /var/log/job.log 2>&1) so errors are not lost.
Other Schedules
Questions
How do I run a cron job every 6 hours?
How do I check the cron job ran?
What is the systemd timer equivalent of 0 */6 * * *?
Free Tools
More tools
Run servers for other people?
Frabs stops the abuse their VMs send out, and keeps your network off blocklists.