Java QuartzJobBean未执行spring引导
我有一个spring boot项目,它使用spring boot starter quartz,版本“2.2.2.RELEASE”和spring boot版本“1.5.10.RELEASE”来计划作业 我随机面临一个问题,其中一些触发器没有执行 以下是我的项目中的quartz.properties文件Java QuartzJobBean未执行spring引导,java,spring,spring-boot,quartz-scheduler,Java,Spring,Spring Boot,Quartz Scheduler,我有一个spring boot项目,它使用spring boot starter quartz,版本“2.2.2.RELEASE”和spring boot版本“1.5.10.RELEASE”来计划作业 我随机面临一个问题,其中一些触发器没有执行 以下是我的项目中的quartz.properties文件 org.quartz.threadPool.threadCount=10 org.quartz.jobStore.class =org.quartz.impl.jdbcjobstore.JobSt
org.quartz.threadPool.threadCount=10
org.quartz.jobStore.class =org.quartz.impl.jdbcjobstore.JobStoreCMT
org.quartz.job-store-type =jdbc
org.quartz.jobStore.useProperties=false
org.quartz.jobStore.driverDelegateClass =org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.tablePrefix =QRTZ_
org.quartz.dataSource.fieldstar.driver=com.mysql.jdbc.Driver
org.quartz.dataSource.fieldstar.maxConnections = 15
org.quartz.scheduler.jobFactory.class = org.quartz.simpl.SimpleJobFactory
触发作业时,我可以在数据库表中看到触发器的行。
当开始时间
达到时,将从此表中删除触发器,并使用QuartzJobBean
为此作业提供的实现将针对某些触发器执行,但不会针对其余触发器执行
以下是计划作业的代码
JobBuilder.newJob(CommonReminderListener.class)
.withIdentity("jobKey")
.withDescription("Test" + jobKey.getGroup())
.usingJobData(jobDataMap)
.storeDurably()
.build();
下面是我对QuartzJobBean的实现
@Component
public class CommonReminderListener extends QuartzJobBean {
@Override
public void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
logger.info("Executing Job with key", jobExecutionContext.getJobDetail().getKey());
}
}
我不确定是什么问题。感谢您的帮助