javaJava @Scheduled
@Scheduled(cron = "0 0 0 ? * MON#1")fieldsField breakdown
- SEC0at second 00-59
- MIN0at minute 00-59
- HR0at 00:000-23
- DOM?on every day of the month1-31 · L · W
- MON*in every month1-12 · JAN-DEC
- DOWMON#1on the first Monday of the month0-7 · MON-SUN · L · #
Spring replaces names before parsing: MON#1 = 1#1 .
next runsNext executions (UTC)
| time | date | in |
|---|---|---|
| 00:00:00 | Mon, 5 Oct 2026 | in 21 hours |
| 00:00:00 | Mon, 2 Nov 2026 | — |
| 00:00:00 | Mon, 7 Dec 2026 | — |
| 00:00:00 | Mon, 4 Jan 2027 | — |
| 00:00:00 | Mon, 1 Feb 2027 | — |
mistakesCommon mistakes
- Writing "0 0 0 1 * MON" and expecting the first Monday — that expression matches only dates that are both the 1st and a Monday.
- Leaving day-of-month as "*" instead of "?". In Spring both fields must match, so "?" makes the intent explicit.