Quartz-quartz.properties配置

其实Quartz JAR文件的org.quartz包下就包含了一个quartz.properties属性配置文件并提供了默认设置。如果需要调整默认配置,可以在类路径下建立一个新的quartz.properties,它将自动被Quartz加载并覆盖默认的设置。

下面是这些默认值的解释

#-----集群的配置
org.quartz.scheduler.instanceName = DefaultQuartzScheduler
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy =  false
org.quartz.scheduler.wrapJobExecutionInUserTransaction = false

#------配置调度器的线程池
#线程池类
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
#线程个数
org.quartz.threadPool.threadCount = 10
#线程优先级
org.quartz.threadPool.threadPriority = 5
#
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
#
org.quartz.jobStore.misfireThreshold = 60000

#------配置任务调度现场数据保存机制,默认保存在内存
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

其实任务调度数据保存机制是可以保存在数据库的,但是这个在实际应用中很少使用,所以我这里就不做笔记了!

猜你喜欢

转载自eksliang.iteye.com/blog/2208495
今日推荐