HangfireIO / Cronos

A fully-featured .NET library for working with Cron expressions. Built with time zones in mind and intuitively handles daylight saving time transitions
MIT License
1.01k stars 120 forks source link

Shouldn't 0 0 15,L * ? work? #52

Open kampilan opened 2 years ago

kampilan commented 2 years ago

0 0 15,L * ? should produce the 15th of the month or the Last day of the month. Instead it complains about the L not being a number.

Am I missing something or should this be supported?

Thanks Jim

arical commented 2 years ago

I came here to post the exact same question. A common pattern for invoices is to run twice per month. On the 15th and the last day.

This library has been amazing so far, but this is making us scramble to find a work around. I was hoping that using 15,31 would work, but it doesn't work for months with less than 31 days.

kampilan commented 2 years ago

Exactly what I needed it for 15,L invoicing. I hate doing this but NCrontab-Advanced supports this and is less quirky. I was able to swap it out in just a few minutes. Good luck

arical commented 2 years ago

Thanks @kampilan. Good to know! Ideally we'd like to continue using Cronos though as the library itself has great support for timezones, which we are making heavy use of.

odinserj commented 2 years ago

Yeah, sounds as a great addition. Need to change the grammar first and then make the according changes to the code, it will be much easier (than changing the grammar). Will try to implement this in the near future, but any help with the grammar is highly appreciated!

arical commented 1 year ago

We have customers that would still love this functionality. It's the only bit of functionality we'd still really love to see. Anything we can do to help out? I had a quick look at the grammar code but that's definitely not my forte 😅

binojvijayakumar commented 1 year ago

any updates on this request?

anvaravind commented 11 months ago

+1 waiting for this feature