javaJava @Scheduled
@Scheduled(cron = "0 0 0 1W * *")fieldsField breakdown
- SEC0at second 00-59
- MIN0at minute 00-59
- HR0at 00:000-23
- DOM1Won the weekday nearest day 1 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 | Mon, 2 Nov 2026 | — |
| 00:00:00 | Tue, 1 Dec 2026 | — |
| 00:00:00 | Fri, 1 Jan 2027 | — |
| 00:00:00 | Mon, 1 Feb 2027 | — |
| 00:00:00 | Mon, 1 Mar 2027 | — |
mistakesCommon mistakes
- Assuming 1W is always the 1st. If the 1st is a Saturday or Sunday, W moves to the nearest Monday-Friday.
- Expecting W to move into the next month: the nearest weekday is always inside the current month.