项目中使用quartz做定时任务遇见的一些问题总结
quartz做持久化配置:
在配置文件中加入这些配置信息就会在数据库生成quartz自带的表,一共11张表
spring.quartz.job-store-type=jdbc
spring.quartz.jdbc.initialize-schema=always
#spring.quartz.jdbc.initialize-schema=never
spring.quartz.properties.org.quartz.scheduler.instanceId=AUTO
spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
spring.quartz.properties.org.quartz.jobStore.useProperties=false
spring.quartz.properties.org.quartz.jobStore.tablePrefix=qrtz_
spring.quartz.properties.org.quartz.jobStore.misfireThreshold=60000
spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval=5000
spring.quartz.properties.org.quartz.jobStore.isClustered=true
spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
spring

本文总结了在项目中使用Quartz进行定时任务时遇到的配置问题,包括如何设置Quartz持久化以在数据库中创建表,以及解决因数据库大小写敏感导致的表找不到错误。在服务器部署时,可能会遇到MySQL配置不一致的问题,需要调整服务器的`lower_case_table_names`参数。若出现表名大小写不一致的情况,可通过修改数据库中表名的大小写来匹配控制台提示,确保Quartz正常运行。
最低0.47元/天 解锁文章
21万+

被折叠的 条评论
为什么被折叠?



