|  |  |  | 
|---|
|  |  |  | SchedulerTaskSupport.threadPoolPriority = threadPoolPriority; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 删除工作任务 | 
|---|
|  |  |  | * @param jobName | 
|---|
|  |  |  | * @param jobGroupName | 
|---|
|  |  |  | * @throws SchedulerException | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public static void deleteJob(String jobName, String jobGroupName) throws SchedulerException{ | 
|---|
|  |  |  | Scheduler sched = SchedulerTaskFactory.getSingleScheduler() ; | 
|---|
|  |  |  | sched.deleteJob(new JobKey(jobName, jobGroupName)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加每X秒钟重复工作一次的工作任务, | 
|---|
|  |  |  | 
|---|
|  |  |  | .withIntervalInSeconds(intervalInSeconds) | 
|---|
|  |  |  | .withRepeatCount(repeatCount)) | 
|---|
|  |  |  | .build(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | sched.scheduleJob(job, trigger); | 
|---|
|  |  |  | sched.start(); | 
|---|
|  |  |  |  | 
|---|