2.1 版本优化,修复定时任务删除后还继续执行的bug

pull/99/head
Elune 2019-07-04 21:58:43 +08:00
parent 76bdb0fc16
commit abb310bfda
1 changed files with 1 additions and 0 deletions

View File

@ -94,6 +94,7 @@ public class QuartzManage {
public void deleteJob(QuartzJob quartzJob){
try {
JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId());
scheduler.pauseJob(jobKey);
scheduler.deleteJob(jobKey);
} catch (Exception e){
log.error("删除定时任务失败", e);