原创地址:http://www.cnblogs.com/Alandre/(泥沙砖瓦浆木匠),需要转载的,保留下!

弟子规 圣人训 首孝弟 次谨信 泛爱众 而亲仁 有余力 则学文

需要:

  1. 导入WEB-INF/lib/quartz-2.2.1.jar
  2. 然后数据库建相关表格,可以去quartz-2.2.1\docs\dbTables目录下找到对应的数据库表格.(我这边Mysql , 导入 tables_mysql.sql 即可)
  3. 配置quartz.properties
    #============================================================================
    # Configure Main Scheduler Properties  
    #============================================================================
    org.quartz.scheduler.instanceName: wmuitpScheduler
    org.quartz.scheduler.instanceId: AUTO
    
    org.quartz.scheduler.skipUpdateCheck: true
    
    
    #============================================================================
    # Configure ThreadPool  
    #============================================================================
    org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
    org.quartz.threadPool.threadCount: 10
    org.quartz.threadPool.threadPriority: 5
    org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true  
    
    #============================================================================
    # Configure JobStore  
    #============================================================================
    
    org.quartz.jobStore.misfireThreshold: 60000
    
    org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
    org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
    org.quartz.jobStore.useProperties=false
    org.quartz.jobStore.dataSource=myDS
    org.quartz.jobStore.tablePrefix=qrtz_
    org.quartz.jobStore.isClustered=true
    
    
    #============================================================================
    # Configure Datasources  
    #============================================================================
    
    org.quartz.dataSource.myDS.driver: com.mysql.jdbc.Driver
    org.quartz.dataSource.myDS.URL: jdbc:mysql://localhost:3307/itp
    org.quartz.dataSource.myDS.user: root
    org.quartz.dataSource.myDS.password: 123456
    org.quartz.dataSource.myDS.maxConnections: 5
    org.quartz.dataSource.myDS.validationQuery: select 0
    View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-11
  • 2021-06-15
  • 2021-09-30
猜你喜欢
  • 2021-10-28
  • 2022-01-21
  • 2021-09-07
  • 2021-12-05
  • 2022-03-01
相关资源
相似解决方案