buildcron

Cron Expression for Every 30 Minutes

Use */30 * * * * to run a cron job every 30 minutes. It fires on the hour and at half past — :00 and :30 — for 48 runs a day.

CRON → ENGLISH
*/30 minute* hour* day of month* month* day of week
VALID EXPRESSION

Every 30 minutes.

*/30 * * * *

Standard 5-field crontab syntax. Day of month and day of week are OR'd when both are set.

NEXT 5 RUN TIMES · local time

What it does

With a step of 30, the minute field */30 keeps only 0 and 30 from the range 0–59. Many people write the same schedule as 0,30 * * * *, which is identical and arguably clearer to a reader who doesn't know the step syntax. The other fields are *, so both minutes match every hour of every day.

Half-hourly is a natural fit for jobs that summarise recent activity: aggregating analytics events into a reporting table, emailing a digest of new support tickets, pulling the latest orders into an accounting system, or checking that the newest backup is recent and alerting when it isn't. It also suits anything billed per request, since it holds the call count at 48 a day.

To keep a half-hourly job away from the busy top of the hour, pick two other minutes 30 apart — 15,45 * * * * runs at quarter past and quarter to. To limit it to part of the day, restrict the hour as well: 0,30 6-22 * * * runs from 6:00 to 22:30 and stays quiet overnight.

How */30 * * * * works, field by field

FIELDVALUEMEANING
Minute*/30every 30 minutes (0 and 30)
Hour*every hour
Day of month*every day of the month
Month*every month
Day of week*every day of the week

Put together, cron reads */30 * * * * as: “Every 30 minutes.

To see further ahead, paste the expression into the cron calculator, which lists the next ten run times and counts how many times the schedule runs in a year.

Frequently asked questions

Is */30 * * * * the same as 30 * * * *?

No. 30 * * * * runs once an hour, at half past. */30 * * * * runs twice an hour, at :00 and :30. The slash is what turns a single minute into a repeating step.

Why does my every-30-minutes job run at :00 and :30 instead of 30 minutes after I start it?

Cron has no idea of “since the last run”. It checks the clock once a minute and runs every job whose fields match, so a half-hourly job is always tied to :00 and :30.

How do I run a job every 90 minutes?

One standard cron line can't do it, because 90 minutes doesn't repeat evenly within a day's hours and minutes. Two lines together cover it — 0 0-21/3 * * * and 30 1-22/3 * * * — or use a systemd timer with OnUnitActiveSec=90min.