0 * * * * runs the job once an hour, at minute 0 of every hour, 24 times a day. The first field pins the minute, the star in the hour field means every hour. The shortcut @hourly expands to exactly this line, so both are interchangeable in any crontab.
Why is minute 0 a bad place to be?
Because everything else is there too. Log rotation, backup agents, monitoring exporters and every other hourly job on the machine fire at the same instant, and a shared database or API sees the whole herd arrive at once. Moving to 17 * * * * costs nothing, spreads the load and often turns a mysterious hourly latency spike into a flat line.
What is the difference between 0 * * * * and @hourly?
Nothing in behaviour: the shortcut is expanded to the same five fields when the crontab is read. The written-out form is preferable in shared files because it can be edited into something else later, and because every reader sees at a glance which minute the job actually uses. @reboot is the only shortcut with no five-field equivalent.
How do I run something every two or three hours?
Put the step in the hour field, not the minute field: 0 */2 * * * runs at 0:00, 2:00, 4:00 and so on. Because 24 is divisible by 2, 3, 4, 6, 8 and 12, those steps stay even across midnight; 0 */5 * * * does not, it jumps from 20:00 straight to the next 0:00.
How to add the expression
- Pick a minute that is not 0 — 7, 17 or 23 are good choices on a busy machine.
- Add the line, for example 17 * * * * /pfad/zum/skript.sh, and save the crontab.
- Make sure the job finishes well within an hour, or add a lock so runs cannot pile up.
- Check the explainer above to confirm the schedule reads the way you intended.