*/30 * * * * runs the job every half hour: at minute 0 and minute 30 of every hour, 48 times a day. It is the shortest interval that still leaves a slow job plenty of headroom, which makes it the default for syncs and imports that take a couple of minutes.
Why write */30 instead of 0,30?
Both mean exactly the same two minutes, and no cron implementation distinguishes them. The step form scales better when you change your mind: turning */30 into */20 is one keystroke, while a list has to be rewritten. The list wins only when the pattern is deliberately irregular, like 5,35 to sit off the round minutes.
What does a half-hourly job cost in a month?
Exactly 1,440 runs in a 30-day month, 48 a day. That matters when each run calls a paid API, spins up a container or writes a log line: 1,440 entries a month fill a log file faster than most people expect. Multiply the runtime by the number of runs before you settle on an interval.
How do I make it every 30 minutes during the day only?
Restrict the hour field: */30 7-19 * * * runs from 7 a.m. through 7:59 p.m. and stays quiet at night. If you need two different rhythms, use two crontab lines — one for the busy hours, one with a coarser interval for the rest. Cron has no if-then, so two lines are the idiomatic answer.
How to add the expression
- Add */30 * * * * plus the command to your crontab and save it.
- Redirect output to a log file and rotate that file, otherwise 1,440 runs a month will quietly fill the disk.
- If the job is slower than a few minutes, guard it with flock -n so two runs never overlap.
- Verify the next run times above match the half-hour rhythm you expect.