Cron Expression for Every 30 Seconds

Every 30 seconds, 2,880 times a day
*/30 * * * * *

Cron reads this as: every 30th second, every minute.

Six fields, not five

This is a Quartz-style expression with seconds in the leading field. Standard Unix cron takes five fields and has a one-minute floor, so it cannot run this line: it would read the sixth field as the start of the command. Quartz itself also wants a ? in one of the day fields, as in */30 * * * * ?. See Quartz vs Unix cron for the differences.

Next 5 runs

These times are in your browser's local time zone. Cron itself uses the server's zone, which on most cloud hosts is UTC. If the difference matters here, see time zones & DST.

When to use this schedule

This expression has six fields with seconds first, which is the Quartz style. Spring's @Scheduled, Quartz itself and several other JVM schedulers support it. Standard Unix cron cannot run it at all.

What to watch out for

Standard cron cannot schedule anything more often than once a minute, so this expression cannot run in a Unix crontab. On plain cron, the usual workaround for sub-minute work is a single minute-level job that loops internally with a sleep. A long-running process with its own timer is the better option. At 30-second intervals, overlap is the main risk: make sure the work reliably finishes in well under 30 seconds, or guard it with a lock.

The crontab line

*/30 * * * * * /usr/local/bin/your-job.sh >> /var/log/your-job.log 2>&1

Send the output to a log you will read. By default cron mails it, and on a host with no mail transport that mail is silently dropped. See the crontab guide for the surrounding syntax.

Related schedules

Variations on every 30 seconds
ExpressionSchedule
0/30 * * * * ?The same schedule in Quartz notation
*/10 * * * * *Every 10 seconds
* * * * *Every minute (standard cron)

Build your own

If this page doesn't cover the schedule you need, compose it field by field in the visual builder, or paste an expression you already have into the explainer for a per-field breakdown. The examples library has sixty schedules in one place, and the guides cover crontab syntax, time zones, troubleshooting and production practices.