Today, I iterate
public void unschedule(final ScheduledEvent event) throws SchedulerException {
...
scheduler.deleteJob(event.getName(), "my group");
...
}
If what i want is to unschedule all jobs, can this be done better (faster)?
2.2 Unschedule Job We can unschedule a Job by calling the unschedule() method of the Scheduler class and passing the TriggerKey . If the related job does not have any other triggers, and the job is not durable, then the job will also be deleted.
If you want to schedule multiple jobs in your console application you can simply call Scheduler. ScheduleJob (IScheduler) passing the job and the trigger you've previously created: IJobDetail firstJob = JobBuilder.
Deleting a Job and Unscheduling All of Its Triggers // Schedule the job with the trigger scheduler. deleteJob(jobKey("job1", "group1"));
Quartz scheduler allows an enterprise to schedule a job at a specified date and time. It allows us to perform the operations to schedule or unschedule the jobs. It provides operations to start or stop or pause the scheduler. It also provides reminder services.
Scheduler#clear()
will delete EVERYTHING, including triggers and calendars
If that's too severe, then I think your iterator is the only alternative
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