FluentScheduler
FluentScheduler copied to clipboard
InitializeWithoutStarting with RunNow
var reg = new Registry();
reg.Schedule(() => Console.WriteLine(123));
JobManager.InitializeWithoutStarting(reg);
Console.ReadLine();
When start app Schedule all the same, action
Where can read detailed documentation about InitializeWithoutStarting
Well, there is not such information on the library documentation. Do you have any specific issue involving this method? Obs: (I believe It will be soon added to documentation)
@tallesl
There's not much to say other than what is already stated on the XML-docs (IntelliSense).
Initialize:
Initializes the job manager with the jobs to run and starts it.
InitializeWithoutStarting:
Initializes the job manager with the jobs without starting it.
One starts right away and the other doesn't, you have to call Start yourself.
For me, both Initialize and InitializeWithoutStarting starts the job immediately.
I had hoped that my jobs will not start unless I call JobManager.Start() in case of InitializeWithoutStarting.
Decided to test a bit further, there's definitely a bug with InitializeWithoutStarting.
This doesn't start the job as expected:
registry = new Registry();
Schedule(() => Console.WriteLine("hello")).ToRunEvery(1).Seconds();
JobManager.InitializeWithoutStarting(registry);
But this starts:
registry = new Registry();
Schedule(() => Console.WriteLine("hello")).ToRunNow();
JobManager.InitializeWithoutStarting(registry);
Reopening and flagging as a bug.
As a side note, I ask myself what's the utility of InitializeWithoutStarting.