How to delete Quartz.net Job

The following two has the same effect. The job will be removed/unscheduled/deleted.

Your must first get the Schedular instance.

scheduler = schedFact.GetScheduler();

Unschedule the Job (basically removes the trigger and hence the job)
scheduler.UnscheduleJob(new TriggerKey("Job1Trigger", "Group1"));

Remove the trigger as well as the job.
scheduler.DeleteJob(new JobKey("Job1", "Group1"));

Both has the same effect. The syntax is actually incorrect on Quartz.net site where they are missing the new operator.

Quartz.net Working Example

I could not find a working example for Quarts.net. The examples at Quart.net site, does not compile. Found out they are build against Quartz.net version 1.0. The following is a working Quartz.net example that is built against Quartz.net 2.0 (Latest). What this job does is write a text message, “Hello Job is executed” in the console every 5 sec.


Start a Visual Studio 2012 project. Select Windows Console Application. Name it Quartz1 or what ever you like.


Download Quartz.NET assembly using NUGET. Right click on project, select “Manage Nuget Packages”. Then search for Quart.NET. Once found select and install. Note that you have to have online connection for this.

Copy and past the following Code

How to delete Quartz.net job