Quartz是一个Java实现的开源任务调度框架,它简单、易用。既可在单机J2SE应用中使用,也可在web应用中使用。
下载地址:http://www.opensymphony.com/quarz/download.action,quarz现在最新的版本是1.6。
如果需要在web应用中使用Quartz,只需将quartz-1.6.jar or quartz-all-1.6.jar文件复制到WEB-INF的lib目录下即可。
一. Quarz的配置文件quartz.properties的介绍
将该文件放在Wen应用的src目录下,使用举例如下:
# 配置主调度属性
org.quartz.scheduler.instanceName = QuartzScheduler
org.quartz.scheduler.instanceId = AUTO
# 配置线程池
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
# 配置线程池的线程数量
org.quartz.threadPool.threadCount = 5
# 配置线程池里线程的优先级
org.quartz.threadPool.threadPriority = 5
# 配置作业存储
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
二. Quarz中的作业使用举例
三. Quarz里的调度器使用举例






























































