Cron on the last Friday of the month
The last Friday of the month in cron is 0 15 10 ? * FRIL in Quartz and Spring, or 6L on AWS; this page lists the next runs, calculated in your browser.
Unix cron has no L. Run Fridays and check that next week is another month: 15 10 * * 5 [ "$(date -d '+7 days' +\%m)" != "$(date +\%m)" ] && your-command (GNU date).
0 15 10 ? * FRIL
cron(15 10 ? * 6L *)
Read by our parser as: At 10:15 AM, on the last Friday of the month. Open in the cron checker
Next 10 runs
Calculating in your browser...
- 1
- 2
- 3
At a glance
- Accepts
- Nothing to enter - the schedule is preset on the page
- Outputs
- The expression in Unix, Quartz/Spring and AWS form, plus its next 10 run times
- Where it runs
- Entirely in your browser, on your device
- What leaves your device
- Nothing - what you type stays in this tab
- Limits
- Run times use your browser's timezone or UTC; real schedulers can start a run late
- Account
- Not required - there is no sign-up
- Price
- Free, with no watermark and no usage cap
- Made by
- Visrut
What it means
L after a day of week means the last one in the month. Quartz's docs give 0 15 10 ? * 6L as "10:15am on the last Friday of every month", and AWS uses the same 6L in its examples. In Spring, though, 6 is Saturday, so 6L would be the last Saturday; FRIL means Friday in both, which is why the form above uses it.
When this is the right schedule
Use it when you want a monthly end-of-week event: a demo day, a team retro, sending month-end figures before the weekend.
When to pick something else
Look elsewhere when you need the last working day of the month (it might be a Monday to Thursday); that's LW.
Things to watch
Numbers versus names
Quartz and AWS: 6 = Friday. Spring and Unix: 5 = Friday, 6 = Saturday. Spring documents both 0 0 0 * * 5L and 0 0 0 * * THUL, so names with L work there; AWS's documentation shows only the numeric 6L, so the AWS form above keeps the number.
The Unix date check
A Friday is the last one in its month exactly when the date seven days later is in the next month. Run every Friday and compare the months; escape % in a crontab line.
Limit it to some years
AWS and Quartz have a year field. AWS's example cron(15 10 ? * 6L 2022-2023) runs only in those two years.
Frequently asked questions
What does 6L mean in a cron expression?
In Quartz and AWS, the last Friday of the month (6 = Friday, counting Sunday as 1). In Spring it's the last Saturday.
How do I get the last Monday of the month?
0 0 9 ? * MONL in Quartz or Spring; cron(0 9 ? * 2L *) on AWS.