Exception when using 6 components
Franklin89 opened this issue · comments
I am getting the following exception when using: CrontabSchedule.Parse
. Using Version 3.3.0
NCrontab.CrontabException: ''* * * * * *' is an invalid crontab expression. It must contain 5 components of a schedule in the sequence of minutes, hours, days, months, and days of week
A 6-field expression is an extension to the standard 5-field crontab expression. Make sure that you call the Parse
method overload that accepts a ParseOptions
object and that its IncludingSeconds
is set to true
, like this:
NCrontab/NCrontab.Tests/CrontabScheduleTests.cs
Lines 69 to 73 in f0c43e0
Ahhh got it thanks :-) sorry for opening and issue for this.
…Sent from my iPhone
On 8 Mar 2018, at 8:37 PM, Atif Aziz ***@***.***> wrote:
A 6-field expression is an extension to the standard 5-field crontab expression. Make sure that you call the Parse method overload that accepts a ParseOptions object and that its IncludingSeconds is set to true, like this:
https://github.com/atifaziz/NCrontab/blob/f0c43e00e65aa025506229891718460e1ad7916b/NCrontab.Tests/CrontabScheduleTests.cs#L69-L73
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Hi @atifaziz I'd consider adding this in the documentation and the exception message as I also nearly created a bug for this.
Thank you!