Appasamy T
Appasamy T

Reputation: 259

Difference between DeleteJob() and Unschedulejob() in Quartz 1.8.5

Can someone let me know the difference between deleteJob() and unscheduleJob() of quartz 1.8.5?

Thanks.

Upvotes: 12

Views: 10408

Answers (1)

Anthony Dahanne
Anthony Dahanne

Reputation: 5053

If you look at the implementations of both methods in QuartzScheduler.java , you'll notice that deleteJob(JobKey jobKey)

  • loops through all the triggers having a reference to this job, to unschedule them
  • removes the job from the jobstore

whereas unscheduleJob(TriggerKey triggerKey) just unschedules a trigger, so if other triggers reference this job, they won't be changed.

Upvotes: 18

Related Questions