Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crontab - Allow L with <day>#<week> syntax for the week field (enhanement) #170

Open
norman-abramovitz opened this issue Sep 13, 2024 · 1 comment

Comments

@norman-abramovitz
Copy link

norman-abramovitz commented Sep 13, 2024

Allow for the ability to use the L for the week field for a crontab entry

You can then specify implied dates like:

MON#L means the last Monday in the last week of the month
FRI#L means the last Friday of the Month

Since there are either 4 or 5 weeks in a month, you can specify tasks to run for last week and not be concerned if there is 4 or 5 weeks for any month.

@norman-abramovitz norman-abramovitz changed the title Allow L with <day>#<week> for the week field (enhanement) Allow L with <day>#<week> syntax for the week field (enhanement) Sep 13, 2024
@norman-abramovitz norman-abramovitz changed the title Allow L with <day>#<week> syntax for the week field (enhanement) Crontab - Allow L with <day>#<week> syntax for the week field (enhanement) Sep 13, 2024
@UserNotFound
Copy link
Member

Hi Norman, I believe this is already implemented, per the documentation for the cron expression evaluator:

L stands for "last". When used in the day-of-week field, it allows you to specify constructs such as "the last Friday" (5L) of a given month. In the day-of-month field, it specifies the last day of the month.

https://github.com/aptible/supercronic/tree/master/cronexpr#l
https://github.com/aptible/supercronic/tree/master/cronexpr#implementation

Are you reporting that this doesn't work, or have you not tried it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants