I've setup a chrono Job using Quartz library for .NET. Basically, I want a job scheduled every hour and every day at a specific minute (i.e. 10). This is done simply with this chrono expression 0 10 * ? * * *, but how can I achieve the following behavior?:
- if the program at XX:12, then run it immediately
- if the program is started before XX:10, then wait for the chrono scheduler
I've tried this solution but It does not work.
q.AddTrigger(opts =>
opts.ForJob(job)
.WithIdentity("CalcServiceJob-trigger")
.StartNow()
.WithCronSchedule("0 10 * ? * * *")
);
I've also tried this configuration without relevant results
q.AddTrigger(opts =>
opts.ForJob(job)
.WithIdentity("CalcServiceJob-trigger")
.WithCronSchedule("0 10 * ? * * *", x => x.WithMisfireHandlingInstructionFireAndProceed())
);