I need a way to allow administrators to delete a job in Quartz.NET. Are there any built in methods for the JobDetail class that allow me delete the job and all associated triggers?
you have to delete the job via the scheduler.
// First we must get a reference to a scheduler
ISchedulerFactory sf = new StdSchedulerFactory(properties);
IScheduler sched = sf.GetScheduler();
sched.DeleteJob(JobName, JobGroup);
As of Today the DeleteJob method need to input JobKey as following.
scheduler.DeleteJob(new JobKey("JobName1", "JobGroup1"));
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