quartz.properties 配置:
org.quartz.threadPool.threadCount = 1
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.scheduler.skipUpdateCheck=true
cron.properties 配置:
cron.com.ovit.quartz.job.SLATaskJob=0/59 * * * * ?
控制台打印的结果:
2016-05-04 09:21:59 [ OmaiScheduler_Worker-1:182267 ] - [ DEBUG ] SLATaskJob, 开始执行SLA服务升级发送通知的定时任务,2016-05-04 09:21:59
2016-05-04 09:21:59 [ OmaiScheduler_Worker-1:182268 ] - [ DEBUG ] select bas.* from t_bas_timer bas
where bas.status=0
and date_format(bas.trigger_time,'%y-%m-%d %H:%i')=date_format(now(),'%y-%m-%d %H:%i')
2016-05-04 09:21:59 [ OmaiScheduler_Worker-1:182279 ] - [ DEBUG ] SLATaskJob, SLA服务升级发送通知的定时任务已经执行
2016-05-04 09:22:00 [ OmaiScheduler_Worker-1:183266 ] - [ DEBUG ] SLATaskJob, 开始执行SLA服务升级发送通知的定时任务,2016-05-04 09:22:00
2016-05-04 09:22:00 [ OmaiScheduler_Worker-1:183267 ] - [ DEBUG ] select bas.* from t_bas_timer bas
where bas.status=0
and date_format(bas.trigger_time,'%y-%m-%d %H:%i')=date_format(now(),'%y-%m-%d %H:%i')
2016-05-04 09:22:00 [ OmaiScheduler_Worker-1:183272 ] - [ DEBUG ] SLATaskJob, SLA服务升级发送通知的定时任务已经执行