How do I delete a trigger for a job in Quartz.net and keep the job? This is only an issue when deleting the last trigger on the job, right now it deletes the job as well.
The code I am using is:
_scheduler.UnscheduleJob(trigger.Key);
and that works fine as long as the job for that triggers has more than one trigger. If this is the last trigger the job is also deleted, and that is something I don't want.
When you create your job you have to specify that you want it to stick around after all triggers have been deleted, which you do by calling StoreDurably()
eg
IJobDetail job = JobBuilder.Create<HelloJob>()
.WithIdentity("job1", "group1")
.StoreDurably()
.Build();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With