Invalid CRON expression

Hi

I am working on setting up a configurable schedule through my own UI and using the built in CRON expression generators I am getting an error:

Basically the user selected to run their job every 10 months. So I use the following code:

Cron.MonthInterval(10);

Which gives me “0 0 0 */10 *”. However when passed to hangfire it blows up with:

“0 is lower than the minimum allowable value for the [Day] field. Value must be between 1 and 31 (all inclusive).”

Shouldn’t this method select a day on its own?

Thanks in advance for any help.

Really looks like an incorrect expression, should be “0 0 1 */10 *” I believe.

Yeah and thats the work around, but thats what the Cron.MonthInterval gives me. Bug?

@Mark_Stanley, thanks for reporting this! The fix will be released in Hangfire 1.6.8.