Skip to content
SpringCronTools

example · 6 fields

Spring Cron Expression for Last day of month

Runs at 00:00:00 on the last calendar day of every month.

spring cron
0 0 0 L * *

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)

Next execution times in UTC
timedatein
00:00:00Sat, 31 Oct 2026—
00:00:00Mon, 30 Nov 2026—
00:00:00Thu, 31 Dec 2026—
00:00:00Sun, 31 Jan 2027—
00:00:00Sun, 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).

nextRelated Spring cron examples

nextRelated guides

nextRelated tools

Questions

When does L run in February?

On the 28th in a normal year and on the 29th in a leap year, because L always means the actual last day of that month.

Can I use L-<n>?

Yes. "0 0 0 L-3 * *" is the third day before the end of the month.