You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a 3rd party lib that uses Cronos for handling cron expressions. This lib always uses CronFormat.IncludeSeconds internally so if I want to run sth. every minute I need need to use 0 * * * * *.
This is no problem in the first place, the first call to CronExpression.Parse(expression, CronFormat.IncludeSeconds) omits the 0 and returns if ToString is called * * * * * if this is used later to call CronExpression.Parse with CronFromat.IncludeSeconds an exception is thrown.
This behaviour was introduced with the fix for #15
I agree to the suggestion that was made, in some way it should be memorized that the initial expression was created explicitly with CronFormat.IncludeSeconds.
The code to reproduce this behavior is more then simple:
using Cronos;
const string expression = "0 1 * * * *";
var cronExpression = CronExpression.Parse(expression, CronFormat.IncludeSeconds);
Console.WriteLine(cronExpression.ToString());
CronExpression.Parse(cronExpression.ToString(), CronFormat.IncludeSeconds);
The text was updated successfully, but these errors were encountered:
I am using a 3rd party lib that uses Cronos for handling cron expressions. This lib always uses
CronFormat.IncludeSeconds
internally so if I want to run sth. every minute I need need to use0 * * * * *
.This is no problem in the first place, the first call to
CronExpression.Parse(expression, CronFormat.IncludeSeconds)
omits the 0 and returns if ToString is called* * * * *
if this is used later to callCronExpression.Parse
withCronFromat.IncludeSeconds
an exception is thrown.This behaviour was introduced with the fix for #15
I agree to the suggestion that was made, in some way it should be memorized that the initial expression was created explicitly with
CronFormat.IncludeSeconds
.The code to reproduce this behavior is more then simple:
The text was updated successfully, but these errors were encountered: