Developer

Encoders, converters & dev utilities

12 tools
Developer · Cron Expression Generator & Explainer

Quartz Cron Expression Generator (6/7-Field, Spring)

Build and explain Quartz-style cron expressions — the 6 or 7-field format used by the Quartz scheduler and Spring @Scheduled(cron=...). Quartz adds a seconds field at the front and an optional year at the end: second minute hour day-of-month month day-of-week [year]. It also adds special characters — ? (no specific value), L (last), W (nearest weekday), and # (nth weekday). Worked example: the Unix weekday job 0 9 * * 1-5 becomes 0 0 9 ? * MON-FRI in Quartz (seconds 0, minute 0, hour 9, ? for day-of-month, MON-FRI for day-of-week). Note Quartz numbers days 1=Sunday..7=Saturday, unlike Unix. The tool generates the correct dialect and previews next runs. Free, no login, 100% client-side.

Quick answer

Quartz cron = 6 or 7 fields: second minute hour day-of-month month day-of-week [year] (adds ? L W # )

  • Worked example: Unix 0 9 * * 1-5 → Quartz 0 0 9 ? * MON-FRI ("at 09:00, Monday–Friday")
  • Quartz day-of-week is 1=Sunday..7=Saturday (NOT the Unix 0/7=Sunday) — do not mix dialects
  • The ? means "no specific value" and is required in exactly one of day-of-month / day-of-week (disambiguates the Unix OR-union)
  • Next-run preview in a timezone you pick; 100% client-side, nothing uploaded
Open the full Cron Expression Generator & Explainer

Frequently asked questions

How is a Quartz cron expression different from Unix cron?

Quartz uses 6 or 7 fields instead of 5: it prepends a seconds field and optionally appends a year, giving second minute hour day-of-month month day-of-week [year]. It also supports extra characters — ? (no specific value), L (last day), W (nearest weekday), and # (nth weekday of the month). And it numbers the week differently: 1 = Sunday through 7 = Saturday. So the Unix weekday job 0 9 * * 1-5 is written 0 0 9 ? * MON-FRI in Quartz.

What does the ? mean in a Quartz cron expression?

The ? means "no specific value" and is used in either the day-of-month or the day-of-week field to say you do not care about that one because you have specified the other. Quartz requires a ? in exactly one of those two fields. It exists to remove the Unix OR-union ambiguity: instead of both day fields being active and matched as a union, ? disables one so only the other applies.

Does Spring @Scheduled use Quartz cron syntax?

Spring's @Scheduled(cron=...) uses a 6-field expression very close to Quartz — second minute hour day-of-month month day-of-week — so it also starts with seconds. It is not identical to Quartz in every detail (some special characters differ), but for common schedules the format matches, e.g. 0 0 9 * * MON-FRI for 09:00 on weekdays. This tool generates the Spring/Quartz 6-field form.

Related Cron Expression Generator & Explainer pages