Java Code Examples for org.quartz.Scheduler#unscheduleJob()
The following examples show how to use
org.quartz.Scheduler#unscheduleJob() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: QuartzManagerUtils.java From kafka-eagle with Apache License 2.0 | 5 votes |
/** Remove job. */ public static void removeJob(String jobName) { try { Scheduler sched = schedulerFactory.getScheduler(); TriggerKey triggerKey = TriggerKey.triggerKey("ke_trigger_name_" + new Date().getTime(), "ke_trigger_group_" + new Date().getTime()); sched.pauseTrigger(triggerKey); sched.unscheduleJob(triggerKey); sched.deleteJob(JobKey.jobKey(jobName, KE_JOB_GROUP_NAME)); } catch (Exception e) { throw new RuntimeException(e); } }
Example 2
Source File: QuartzUtils.java From quartz-web with Apache License 2.0 | 4 votes |
public static void removeTrigger(String triggerName, String triggerGroup, Scheduler scheduler) throws SchedulerException { TriggerKey triggerKey = getTriggerKey(triggerName, triggerGroup); scheduler.unscheduleJob(triggerKey); }
Example 3
Source File: QuartzUtils.java From quartz-web with Apache License 2.0 | 2 votes |
/** * 删除Trigger * @param trigger * @param scheduler * @throws SchedulerException */ public static void removeTrigger(Trigger trigger, Scheduler scheduler) throws SchedulerException { scheduler.unscheduleJob(trigger.getKey()); }