javaJava @Scheduled
@Scheduled(cron = "0 0 0 L * *")fieldsField breakdown
- SEC0at second 00-59
- MIN0at minute 00-59
- HR0at 00:000-23
- DOMLon the last day of the month1-31 · L · W
- MON*in every month1-12 · JAN-DEC
- DOW*on every day of the week0-7 · MON-SUN · L · #
next runsNext executions (UTC)
| time | date | in |
|---|---|---|
| 00:00:00 | Sat, 31 Oct 2026 | — |
| 00:00:00 | Mon, 30 Nov 2026 | — |
| 00:00:00 | Thu, 31 Dec 2026 | — |
| 00:00:00 | Sun, 31 Jan 2027 | — |
| 00:00:00 | Sun, 28 Feb 2027 | — |
mistakesCommon mistakes
- Hardcoding "31" — that expression silently skips months with fewer days.
- Forgetting February: "0 0 0 31 2 *" never runs, while L runs on the 28th (29th in a leap year).