BackendBench
Coffee

Home › Guides › sec

Cron symbol: sec

The seconds field in Quartz and Spring cron

Quartz and Spring put seconds first, giving six fields. Unix cron, Kubernetes, Jenkins, GitHub Actions and EventBridge have no seconds, so one minute is their finest unit.

The rules

Examples you can copy

0/30 * * * * ?

Every 30 seconds. Every 30 seconds.

First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 00:00 · Fri, 01 Jan 2027, 00:01 · Fri, 01 Jan 2027, 00:01

0 */5 * * * ?

Every 5 minutes. Every 5 minutes, at second 0.

First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 00:05 · Fri, 01 Jan 2027, 00:10 · Fri, 01 Jan 2027, 00:15

* */5 * * * ?

Every second, every 5 minutes. Wrong on purpose: fires every second of every fifth minute (60 times).

First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 00:00 · Fri, 01 Jan 2027, 00:00 · Fri, 01 Jan 2027, 00:00

*/10 * * * * *

Every 10 seconds. Every 10 seconds in Spring.

First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 00:00 · Fri, 01 Jan 2027, 00:00 · Fri, 01 Jan 2027, 00:00

Common mistakes

Frequently asked questions

How do I run something every 5 seconds in Kubernetes?

You cannot with a CronJob. Run a long-lived process with its own loop, or a sidecar.

More cron guides

More tools you might need