Closed Raaghulsundar closed 2 years ago
Unable to use cron expression 0 0 12 LW -> At 12:00:00pm, on the last weekday of the month, every month
Sorry, but this is non-standard and ambiguous.
Non-standard because I know of no "W" in the crontab "standard" man 5 crontab and even if I look at crontab.guru
Ambiguous because when is the last weekday? Friday, Saturday, Sunday? It depends on the organization.
If you want "at 12:00 on the last friday of the month" please use 0 12 * * fri#L
as seen in the hash extension.
If you want "at 12:00 on the last day of the month", please use 0 12 L * *
as seen in Fugit::Cron's doc
I am closing the issue, but I am not closing the conversation.
King regards.
Issue description
Unable to use cron expression 0 0 12 LW -> At 12:00:00pm, on the last weekday of the month, every month
How to reproduce
The simplest piece of code that reproduces the issue, for example:
Error and error backtrace (if any)
NoMethodError: undefined method `next_time' for nil:NilClass
Expected behaviour
Context