Take the 2-minute tour ×

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:


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.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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()


 IJobDetail job = JobBuilder.Create<HelloJob>()
        .WithIdentity("job1", "group1")
share|improve this answer
Perfect! Thank you! –  Tomas Jansson Apr 4 '13 at 6:13

You can also use

// Unschedule a particular trigger from the job (a job may have more than one trigger)
scheduler.UnscheduleJob(new TriggerKey("trigger1", "group1"));

Note that my syntax is slightly different than the Quartz.net reference

share|improve this answer
I think that might have the same issue as I described in my test, that is, it also deletes the job if it is the last trigger. –  Tomas Jansson Nov 21 '13 at 15:53
That's correct, it deletes the job if it was the last trigger. Sorry did not ready your question in entirety. –  hmd Nov 21 '13 at 20:03

Your Answer


