持久化Job须知:
1、Quartz默认使用RAMJobStore,org.quartz.simple.RAMJobStore
2、quartz-2.x.x.jar包下的org.quartz包下存储了默认配置quartz.properties
3、Quartz 提供了两种类型的持久性 JobStore,为JobStoreTX和JobStoreCMT
在类路径重写quartz.properties
例如:
org.quartz.scheduler.instanceName = MyScheduler org.quartz.threadPool.threadCount = 3 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate org.quartz.jobStore.tablePrefix = QRTZ_ org.quartz.jobStore.dataSource = myDS org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver org.quartz.dataSource.myDS.URL = jdbc:mysql://localhost:3306/quartz?characterEncoding=utf-8 org.quartz.dataSource.myDS.user = root org.quartz.dataSource.myDS.password = 123456 org.quartz.dataSource.myDS.maxConnections =5