cron-parser
cron-parser copied to clipboard
[Feature Request] It would be nice to support last x days, e.g. '0 0 0 L-3 * *' (3 days to the end of every month)
Some other tools support L-3
https://www.freeformatter.com/cron-expression-generator-quartz.html
Hi @harrisiirak
-
Do you think it is worthwhile adding support for things like
L-3
, I checked the code and feel like it would not be a quick change. -
I know CRON expressions don't support
fortnightly
, would you think it is possible to implement it as an extension?
Thanks and regards, Johnny
HI @johnnynanjiang!
I've been trying to keep this library as lean as possible (with some minor deviations) and avoiding adding anything very complex that has impact to code complexity itself, or to the performance (everything has its cost). While L-n
(and some other Quartz specific features) looks useful in some cases, greater impact needs to be evaluated. I'm not saying no (by not closing it and tagging this as a feature request) to this but I don't probably have enough any time evaluate the possible implementation myself in the near future.
Extensions (and configurable ones, with an option to switch them on or off) sounds an interesting and intriguing idea, but probably will not scale/work well with current internal implementation. As there has been different wishes (like switching off all non-standard features, only working with some specific features), such extension/feature level approach looks like useful opportunity. This however needs a bit different approach on the code level - something to think in the future.
Thanks @harrisiirak for your detailed response, it makes sense.
We are using your library for our product for now, appreciate the great work. Hopefully we could have some time together to work on these new features.