Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to delete or re-schedule a quartz job?  RSS feed

 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please have a look at the below code



Here I created the `deleteJob()` method to delete and re-open or re-schedule the jobs listed in `passportReminder1()`. However I have no idea about how to it. Hw can I delete or re-schedule a quartz job? I am using the quartz 2 API.

Note: I posted this in here but I am not happy with the answer at all.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with Quartz, but to me it looks like Scheduler scheduler = new StdSchedulerFactory().getScheduler(); creates a new scheduler each time it's called. If that's true then you're trying to delete a job from a scheduler that hasn't registered the job. You should probably create one scheduler and keep a reference to it throughout your code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!