Field-by-field breakdown
| Field | Value | Meaning |
|---|---|---|
| Second | */30 | 0 and 30 |
| Minute | * | Every minute |
| Hour | * | Every hour |
| Day of month | * | Every day of the month |
| Month | * | Every month |
| Day of week | * | Every day of the week |
Copy-paste examples
Spring Boot (Java)
@Scheduled(cron = "*/30 * * * * *")
public void runJob() {
// runs on the schedule above
}
node-cron (Node.js)
import cron from 'node-cron';
cron.schedule('*/30 * * * * *', () => {
console.log('job ran at', new Date().toISOString());
});
Plain Linux crontab (workaround)
* * * * * /usr/local/bin/my-job.sh
* * * * * sleep 30; /usr/local/bin/my-job.sh
Common variations
Click an expression to load it into the tool above.
| Cron expression | Schedule |
|---|---|
| Every 10 seconds. | |
| At seconds 0 and 30 past the minute. | |
| Every 30 seconds, between 9:00 AM and 5:59 PM, Monday through Friday. | |
| Every 5 seconds. |
Frequently asked questions
What does */30 * * * * * mean in cron?
Every 30 seconds. The six fields are second */30, minute *, hour *, day of month *, month * and day of week *.
When will */30 * * * * * run next?
It depends on the current time and the time zone of the machine running cron. The calculator on this page shows the next 5 run times in your local time zone; on a server, cron uses the system time zone, which is often UTC.
Can Linux crontab run a job every 30 seconds?
Not directly — crontab only supports one-minute resolution. Add two entries: * * * * * /path/to/job and * * * * * sleep 30; /path/to/job. For sub-minute scheduling without workarounds, use a systemd timer (OnUnitActiveSec=30s) or a scheduler with a seconds field.