BackendBench
Coffee

Home โ€บ Guides โ€บ L

Cron symbol: L

The L (last) character in Quartz cron

L stands for "last". In day-of-month it means the last day of the month, whatever its length. In day-of-week it means the last occurrence of a weekday in the month.

The rules

Examples you can copy

0 0 18 L * ?

At 18:00 UTC, on the last day of the month. 6 PM on the last day of every month.

First runs after 1 Jan 2027 (UTC): Sun, 31 Jan 2027, 18:00 ยท Sun, 28 Feb 2027, 18:00 ยท Wed, 31 Mar 2027, 18:00

0 0 18 L-3 * ?

At 18:00 UTC, on 3 days before the last day of the month. Three days before month end, handy for pre-close reminders.

First runs after 1 Jan 2027 (UTC): Thu, 28 Jan 2027, 18:00 ยท Thu, 25 Feb 2027, 18:00 ยท Sun, 28 Mar 2027, 18:00

0 0 18 LW * ?

At 18:00 UTC, on the last weekday of the month. The last working day of the month.

First runs after 1 Jan 2027 (UTC): Fri, 29 Jan 2027, 18:00 ยท Fri, 26 Feb 2027, 18:00 ยท Wed, 31 Mar 2027, 18:00

0 0 12 ? * 6L

At 12:00 UTC, on the last Fri. Noon on the last Friday of every month.

First runs after 1 Jan 2027 (UTC): Fri, 29 Jan 2027, 12:00 ยท Fri, 26 Feb 2027, 12:00 ยท Fri, 26 Mar 2027, 12:00

0 0 12 * * 5L

At 12:00 UTC, on the last Fri. Spring numbers Friday as 5, so the last Friday is 5L.

First runs after 1 Jan 2027 (UTC): Fri, 29 Jan 2027, 12:00 ยท Fri, 26 Feb 2027, 12:00 ยท Fri, 26 Mar 2027, 12:00

Common mistakes

Frequently asked questions

How do I run on the last day of the month in plain cron?

Standard cron cannot express it. Schedule days 28-31 and check inside the job that tomorrow is the 1st.

Does LW skip holidays?

No. It only knows about weekends, not public holidays.

More cron guides

More tools you might need