quartz-config.yml 1.0 KB

123456789101112131415161718192021222324
  1. # 如下配置为使用数据库存储定时任务,属性不经常修改,所以不放在 application.yml 中统一管理
  2. spring:
  3. quartz:
  4. properties:
  5. org:
  6. quartz:
  7. scheduler:
  8. instanceName: clusteredScheduler
  9. instanceId: AUTO
  10. jobStore:
  11. class: org.springframework.scheduling.quartz.LocalDataSourceJobStore # 数据库存储
  12. driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # 数据库代理
  13. tablePrefix: QRTZ_ # 表前缀
  14. isClustered: true # 集群
  15. clusterCheckinInterval: 30000 # 集群检查间隔
  16. useProperties: false
  17. threadPool:
  18. class: org.quartz.simpl.SimpleThreadPool # 线程池
  19. threadCount: 50 # 线程数量
  20. threadPriority: 5 # 线程优先级
  21. threadsInheritContextClassLoaderOfInitializingThread: true # 是否继承类加载器
  22. job-store-type: jdbc # 持久化到数据库
  23. jdbc:
  24. initialize-schema: never # 不初始化表结构