cronuru
Pattern

Every 15 Seconds

*/15 * * * * *
0/15 * * * * ?

Runs every 15 seconds — at :00, :15, :30, :45 of each minute. Requires a seconds-aware dialect (Spring or Quartz); standard Unix cron is minute-precision only.

Use in your stack

# No seconds field in crontab, so tile the minute with four entries.
# flock -n skips a run instead of stacking if the last one overran.
* * * * * flock -n /tmp/sync.lock /usr/local/bin/sync.sh
* * * * * sleep 15; flock -n /tmp/sync.lock /usr/local/bin/sync.sh
* * * * * sleep 30; flock -n /tmp/sync.lock /usr/local/bin/sync.sh
* * * * * sleep 45; flock -n /tmp/sync.lock /usr/local/bin/sync.sh

# Or a systemd timer — /etc/systemd/system/sync.timer
# AccuracySec must be set: the 1min default would coalesce all four
# firings into a single per-minute run.
#   [Timer]
#   OnCalendar=*-*-* *:*:00/15
#   AccuracySec=1s
{
  "schedule": {
    "cron": "0/15 * * * * ?",
    "timezone": "UTC"
  }
}
// 6-field: second minute hour day-of-month month day-of-week
@Scheduled(cron = "*/15 * * * * *")
public void everyFifteenSeconds() {
    // ...
}

// Simpler for pure intervals — no cron parser needed:
@Scheduled(fixedRate = 15000) // milliseconds
public void everyFifteenSecondsFixedRate() {
    // ...
}

Next runs

Pick a timezone to see when this expression fires next.

Next 10 runs
  1. 012026-09-09T15:00:00.000Z
  2. 022026-09-09T15:00:15.000Z
  3. 032026-09-09T15:00:30.000Z
  4. 042026-09-09T15:00:45.000Z
  5. 052026-09-09T15:01:00.000Z
  6. 062026-09-09T15:01:15.000Z
  7. 072026-09-09T15:01:30.000Z
  8. 082026-09-09T15:01:45.000Z
  9. 092026-09-09T15:02:00.000Z
  10. 102026-09-09T15:02:15.000Z

Variations

*/10 * * * * *

Every 10 seconds

*/20 * * * * *

Every 20 seconds

*/30 * * * * *

Every 30 seconds

Common use cases

  • Polling a queue or message broker that fills quickly.
  • Refreshing a live dashboard or real-time metric during development.
  • Health-checking a service that needs sub-minute failure detection.
  • Flushing a buffer to a downstream system on a tight cadence.

Gotchas

  • **Unix crontab cannot do this in one line.** The 5-field format has no seconds field; its minimum is `* * * * *` (every minute). Kubernetes CronJob and GitHub Actions inherit the same limit. Four offset entries get you there — see the Linux tab above.
  • **A systemd timer here needs `AccuracySec=1s`.** It defaults to **1 minute**, so `OnCalendar=*-*-* *:*:00/15` on its own lets systemd coalesce the four firings into one. The unit looks correct and runs a quarter as often as intended.
  • Four entries is the last comfortable size for the `sleep`-offset trick. Below 15 seconds the line count grows fast — 10s needs six entries, 5s needs twelve — and a loop or timer becomes the better answer.
  • In Spring, `*/15 * * * * *` is the 6-field form (seconds first). Don't confuse it with Unix's 5-field `*/15 * * * *`, which means every 15 *minutes*.
  • In Quartz, use `0/15 * * * * ?` — the `0/15` seconds field means "starting at second 0, every 15 seconds," and `?` fills the unused day-of-week field.
  • For a pure interval, a `fixedRate`/`fixedDelay` loop is simpler and cheaper than a cron parser. Use `@Scheduled(fixedRate = 15000)` in Spring or `tokio::time::interval` in Rust.
  • Watch for overlap — if a run ever exceeds 15 seconds, executions stack up. Prefer `fixedDelay` (waits for the previous run) or an in-flight guard.

Standard cron — the kind in /etc/crontab, Kubernetes CronJobs, and GitHub Actions — has five fields starting at minutes. There is no seconds field, so “every 15 seconds” isn’t expressible. The finest you can schedule is once a minute.

On Linux, without changing schedulers

Fifteen seconds divides 60 cleanly, so four crontab entries tile the minute exactly — one on the minute, then sleep 15, sleep 30, sleep 45 (full block in the Linux tab above). This is the largest the sleep-offset trick gets before it turns silly: ten seconds needs six entries, five needs twelve.

The trade-off is drift. sleep 15 starts when cron forks the job, not at the top of the minute, so under load the offset copies wander. Wrap each in flock -n so a slow run is skipped rather than stacked.

A systemd timer avoids both problems:

[Timer]
OnCalendar=*-*-* *:*:00/15
AccuracySec=1s

AccuracySec is required, not decorative. It defaults to 1 minute, so without it systemd is free to coalesce all four firings into a single per-minute run — the unit looks right and runs a quarter as often as you asked. See systemd timers.

Or use a dialect that has seconds

To go sub-minute you need a 6-field, seconds-first dialect:

For an interval this tight, though, a plain timer is usually the better tool. Spring’s @Scheduled(fixedRate = 15000) and Rust’s tokio::time::interval(Duration::from_secs(15)) both express “every 15 seconds” without a cron parser — and they’re easier to reason about when a run might overrun its window. See also every 10 seconds and every 30 seconds.

See sub-minute scheduling for the per-runtime support matrix and the crontab sleep-offset workaround.

Want an interval that doesn’t divide 60? See every 45 seconds for the non-divisor trap and its four-entry fix.

Frequently asked questions

What is the cron expression for every 15 seconds?
In a seconds-aware dialect, every 15 seconds is `*/15 * * * * *` (Spring) or `0/15 * * * * ?` (Quartz). Standard Unix/crontab has no seconds field, so it cannot schedule every 15 seconds — its finest granularity is one minute (`* * * * *`).
How do I run a cron job every 15 seconds on Linux?
The crontab workaround is four entries tiling the minute — one plain, then three offset with `sleep 15`, `sleep 30` and `sleep 45`, ideally wrapped in `flock -n` so a slow run is skipped rather than stacked. The cleaner option on a systemd distro is a timer with `OnCalendar=*-*-* *:*:00/15` **and `AccuracySec=1s`**; `AccuracySec` defaults to 1 minute, and without lowering it systemd collapses all four firings into one.
Why doesn't `*/15 * * * *` run every 15 seconds?
`*/15 * * * *` is a 5-field Unix expression, and its first field is minutes — so it runs every 15 *minutes*. Unix cron has no seconds field. To get every 15 seconds you need a 6-field dialect where the first field is seconds, such as Spring (`*/15 * * * * *`) or Quartz (`0/15 * * * * ?`).
How do I run something every 15 seconds in Spring Boot?
Two options. With cron syntax: `@Scheduled(cron = "*/15 * * * * *")`. Or, more simply, with a fixed rate: `@Scheduled(fixedRate = 15000)` (the value is milliseconds). Use `fixedDelay = 15000` instead if each run should wait for the previous one to finish before the timer restarts.
Can Kubernetes CronJob run a job every 15 seconds?
No. Kubernetes CronJob uses the standard 5-field cron format with a one-minute minimum, so the fastest it schedules is once per minute. For sub-minute work, run a long-lived Deployment with an internal loop (e.g. `sleep 15`) or a language-level timer instead of a CronJob.

More seconds schedules

Other patterns on the same cadence — or browse every schedule.