每个job都会有job执行上下文:JobExecutionContext 。
public void execute(JobExecutionContext context) ;
通过job执行上下文获取Scheduler:
context.getScheduler();
然后调用getJobKeys就可以获得所有运行中的Job了:
Set<JobKey> jobKeySet = scheduler.getJobKeys(GroupMatcher.anyGroup());
每个job都会有job执行上下文:JobExecutionContext 。
public void execute(JobExecutionContext context) ;
通过job执行上下文获取Scheduler:
context.getScheduler();
然后调用getJobKeys就可以获得所有运行中的Job了:
Set<JobKey> jobKeySet = scheduler.getJobKeys(GroupMatcher.anyGroup());