Cron expression generator · every 30 minutes

Cron job every 30 minutes

The crontab line for a job every 30 minutes is */30 * * * *. It runs 48 times a day, 17,520 times a year. Edit it below to see the next runs in your time zone.

—

Next runs

    Field by field

    How */30 * * * * reads

    The five fields are minute, hour, day of month, month and day of week. A star means every value.

    FieldValueMeaning
    Minute*/30every 30th minute: 0, 30
    Hour*every hour
    Day of month*every day of month
    Month*every month
    Day of week*every day of week

    For example, from Wednesday 6 January 2027 at 10:07 the next runs are: Wed 6 Jan 2027, 10:30; Wed 6 Jan 2027, 11:00; Wed 6 Jan 2027, 11:30; Wed 6 Jan 2027, 12:00; Wed 6 Jan 2027, 12:30.

    When to use it

    What a job every 30 minutes is for

    Twice an hour suits jobs that are useful but not urgent: refreshing exchange rates, re-indexing search, or retrying failed webhooks.

    Mistakes

    Common mistakes

    • «30 * * * *» runs once an hour, at half past. Twice an hour is «*/30» or «0,30».
    • «*/45» does not mean every 45 minutes: it runs at :00 and :45, then :00 again 15 minutes later. Steps restart every hour, so only divisors of 60 give an even rhythm.
    systemd

    The same schedule as a systemd timer

    On systems with systemd, a timer can replace the crontab line: OnCalendar=*:0/30. Check it with systemd-analyze calendar "*:0/30", which prints the next run.

    Monitoring

    Know when it didn’t run

    Cron doesn’t tell you when a job stops running. Add a heartbeat monitor with a period of 30 minutes and end the line with a call to its URL, for example */30 * * * * /path/job.sh && curl -fsS -m 10 <ping URL>. If a ping is late by more than the grace time you set, you get an alert, and a call to the URL with /fail reports a failure at once.

    What is the cron expression for a job every 30 minutes?

    */30 * * * *. It runs 48 times a day, 17,520 times a year, on the server’s clock.

    How do I run a job every 30 minutes with systemd instead?

    Create a timer with OnCalendar=*:0/30 next to a service that runs the job, then enable it with systemctl enable --now name.timer. Persistent=true also runs a run that was missed while the machine was off.