node-cron-expression icon indicating copy to clipboard operation
node-cron-expression copied to clipboard

Year expression

Open hithaaaa opened this issue 1 year ago • 1 comments

  • I'm submitting a ... [ ] bug report [ x ] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project

  • Summary This library doesn't have an expression for a given year/frequency of years. If I wanted a cron expression to also include a specific year to run or frequency to run, this is not generated or accounted for. This is important for when a cron expression validator expects 6 fields.

  • Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

  • Modify data structure to include year enum and write functions similar to everyHour() or atHour().

hithaaaa avatar Aug 10 '24 18:08 hithaaaa

Hi @hithaaaa, I think the best way to generate one year expression is to make combination to expression, for example: every year is "0 0 1 1 *". Using expressions like this, you can make when you need it

Victor1890 avatar Aug 12 '24 02:08 Victor1890