Is there a way to delete a scheduled trigger with a specific job? It seems that only way to delete a trigger is to delete the whole job and then re-register the job and trigger.
I've a job which can potentially have 100+ triggers and I really don't want to delete the job and re-register all the triggers when I just have to delete 1 trigger.
Also, is there a way to stop the scheduler from executing the job as soon as the trigger is configured?
Thanks
Deleting a Job and Unscheduling All of Its Triggers // Schedule the job with the trigger scheduler. deleteJob(jobKey("job1", "group1"));
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.
Trigger - a component that defines the schedule upon which a given Job will be executed. JobBuilder - used to define/build JobDetail instances, which define instances of Jobs.
try scheduler.unscheduleJob
this accepts the trigger and group names as a parameters and will only remove the trigger specified, not the job.
QuartzScheduler
Scheduler
Forum
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