Cron expression for every 30 minutes
*/30 * * * * runs a job every half hour, at :00 and :30 past each hour.
Runs entirely in your browser. Nothing you paste is sent to our server, stored or logged.
*/30 * * * *
When it runs next
What it means
With a step of 30 the minute field only has two values, so 0,30 * * * * is the same schedule and arguably clearer. Both run 48 times a day.
To run every thirty minutes but away from the top of the hour, shift the values: 15,45 * * * * runs at quarter past and quarter to. That small offset is a kindness to shared servers and rate limited APIs, where everything else tends to fire exactly on the hour.
Common variations
| Expression | Runs |
|---|---|
0,30 9-17 * * 1-5 | Every half hour during working hours on weekdays |
15,45 * * * * | Every half hour, at quarter past and quarter to |
*/30 0-6 * * * | Every half hour overnight, until 6:30 |
As a crontab line
Add the command you want to run after the five fields, then save it with
crontab -e:
*/30 * * * * /path/to/script.sh