---
title: "Quartz and Spring cron expressions explained"
url: "https://cronmissed.com/cron/quartz-and-spring.md"
canonical_url: "https://cronmissed.com/cron/quartz-and-spring"
last_updated: "2026-11-10"
type: "reference"
summary: "Quartz and Spring cron have a seconds field and a ? character. See the fields, four examples next to their five-field cron lines, and what cannot convert."
related: ["https://cronmissed.com/cron.md", "https://cronmissed.com/tools/cron-explainer.md", "https://cronmissed.com/tools/cron-generator.md", "https://cronmissed.com/learn/cron-syntax-cheat-sheet.md", "https://cronmissed.com/guides/linux-crontab.md"]
---

# Quartz and Spring cron expressions explained

> **For AI agents:** the complete index of CronMissed pages is [llms.txt](https://cronmissed.com/llms.txt). Every page is also served as markdown at its URL plus .md.

Quartz and Spring cron have a seconds field and a ? character. See the fields, four examples next to their five-field cron lines, and what cannot convert.

A Quartz cron expression has six or seven fields and starts with seconds, and a Spring cron expression has six fields in the same order. Unix cron has five and no seconds. Most Quartz and Spring schedules convert to a five-field line, and a few cannot.

## What are the fields of a Quartz cron expression?

| Position | Field | Allowed values |
| --- | --- | --- |
| 1 | Seconds | 0-59 |
| 2 | Minutes | 0-59 |
| 3 | Hours | 0-23 |
| 4 | Day of the month | 1-31, or ? for no specific value |
| 5 | Month | 1-12 or JAN-DEC |
| 6 | Day of the week | 1-7 with 1 as Sunday, or SUN-SAT, or ? |
| 7 | Year (optional) | 1970-2099 |

Quartz requires a `?` in one of the two day fields, so that the other decides which days the job runs. `0 15 10 ? * MON-FRI` runs at 10:15 on weekdays. L, W and # add the last day of a month, the nearest weekday and the nth weekday, which Unix cron has no way to say.

## How is Spring cron different?

- Spring has six fields: seconds, minutes, hours, day of the month, month and day of the week. There is no year.
- The day of the week runs from 0 to 7, and both 0 and 7 are Sunday, as in Unix cron. In Quartz, 1 is Sunday.
- Spring does not need the `?`. When it is written, it means the same as a star.
- When both day fields are restricted, a Spring schedule runs only on days that match both, while Unix cron runs on days that match either.

## How does a Quartz or Spring expression read as five-field cron?

| Quartz or Spring expression | Five-field cron | Runs |
| --- | --- | --- |
| `0 0 12 * * ?` (Quartz) | `0 12 * * *` | Every day at 12:00. |
| `0 15 10 ? * MON-FRI` (Quartz) | `15 10 * * 1-5` | At 10:15 on weekdays. |
| `0 0 9 ? * 2-6` (Quartz) | `0 9 * * 1-5` | At 09:00 on weekdays. The 2-6 is Monday to Friday, because Quartz counts Sunday as 1. |
| `0 0 9 * * MON` (Spring) | `0 9 * * 1` | At 09:00 every Monday. |

The seconds field is dropped when it is 0, and the `?` becomes a star. The day numbers are the part to watch: the same digit means a different weekday in Quartz and in Unix cron, so the [converter](https://cronmissed.com/tools/cron-generator.md) reads the days and writes them again instead of copying the digits.

## What cannot be converted to five-field cron?

- **Seconds other than 0.** `*/30 * * * * ?` runs every 30 seconds. The converter rounds it to the minute and says so.
- **The last day of the month.** `0 0 0 L * ?` runs at midnight on the last day of every month, and a five-field line has no form for it.
- **The nth weekday and the nearest weekday.** `0 0 12 ? * 6#3` (the third Friday) and `15W` (the weekday nearest the 15th) have no five-field line either.

For a last-day job, schedule the line for days 28 to 31 and have the script exit unless tomorrow is the first. For anything under a minute, see [cron every 30 seconds](https://cronmissed.com/learn/cron-every-30-seconds.md).

## Can CronMissed watch a Quartz or Spring schedule?

A CronMissed check takes a five-field schedule, so a line with six or seven fields is refused with an error that names the part it cannot read. Convert the schedule first. Paste it into the [cron expression translator](https://cronmissed.com/tools/cron-explainer.md) with Quartz or Spring chosen as the scheduler, or into the [crontab generator and converter](https://cronmissed.com/tools/cron-generator.md), copy the five-field line it shows, and use that as the schedule of the check. The job then pings the check when it finishes, like any other job.

## Questions

### Why does a Quartz expression have a question mark?

Quartz cannot say "either day field matches", so it asks you to name the one that decides. A `?` in the other field means "no specific value".

### Is 1 Sunday or Monday in cron?

In Quartz, 1 is Sunday. In Unix cron and Spring, 0 and 7 are Sunday and 1 is Monday. Day names such as MON avoid the mix-up.

### How do I write every 5 minutes in Quartz?

Use `0 0/5 * * * ?`, with the 0 in the seconds field. In five-field cron the same schedule is `*/5 * * * *`.

## Related pages

- [/tools/cron-explainer](https://cronmissed.com/tools/cron-explainer.md)
- [/tools/cron-generator](https://cronmissed.com/tools/cron-generator.md)
- [/learn/cron-syntax-cheat-sheet](https://cronmissed.com/learn/cron-syntax-cheat-sheet.md)
- [Cron expressions](https://cronmissed.com/cron.md)
- [/guides/linux-crontab](https://cronmissed.com/guides/linux-crontab.md)

## Related

- [Cron expression and crontab examples](https://cronmissed.com/cron.md)
- [Cron expression translator and evaluator](https://cronmissed.com/tools/cron-explainer.md)
- [Crontab generator and cron dialect converter](https://cronmissed.com/tools/cron-generator.md)
- [Cron syntax cheat sheet: fields and examples](https://cronmissed.com/learn/cron-syntax-cheat-sheet.md)
- [Monitor Linux crontab jobs with curl](https://cronmissed.com/guides/linux-crontab.md)
