Common causes
A step that divides 60
Every 5, 10, 15, 20 or 30 minutes lines up with the hour and the rhythm is even.
Input
*/5 * * * *
Cron Explainer says
Every 5 minutes
A step that does not divide 60
*/7 runs at minutes 0, 7, 14, 21, 28, 35, 42, 49 and 56. Then the hour ends and it runs again at minute 0, four minutes after the last one.
Input
*/7 * * * *
Cron Explainer says
Every 7 minutes, restarting each hour
The same rule for hours
*/5 in the hour field means hours 0, 5, 10, 15 and 20. After 20:00 the next run is at 00:00, four hours later, not five.
Input
0 */5 * * *
Cron Explainer says
At minute 0, every 5 hours (restarting each day)
Every minute
Five stars run every minute. */1 means the same.
Input
* * * * *
Cron Explainer says
Every minute
How to fix it
- Pick a step that divides 60 (or 24 for hours), or list the minutes yourself: 0,20,40.
- For an interval cron cannot express, run every 30 minutes and have the script check the time since its last run.
- Use a systemd timer with OnUnitActiveSec if the gap must be exact.
- Paste the line into the cron explainer: it lists the next run times, so an uneven gap is visible.