Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 738
Appasamy T Avatar asked May 04 '12 05:05

Appasamy T


1 Answers

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.

like image 165
Anthony Dahanne Avatar answered Oct 03 '22 23:10

Anthony Dahanne