Quartz log异常

在启动java工程的时候,发现console里面打了一些quratz的异常日志

This scheduler instance (server081288142483453) is still active but was recovered by another instance in the cluster. This may cause inconsistent behavior. 

查了一下,原因为集群之间的时间没有同步,因为我是本地调用的服务器端的数据库。解决方法如下:

  • 修改服务器端数据库的时间
  • 若用了ntpd,请同步所有的时间
  • 或修改quartz.properties的配置,设置org.quartz.jobStore.clusterCheckinInterval = 10000(注意此项不宜设置过长,需要根据定时任务触发的时间来确定,若每秒钟都触发,那就不好这样设置了)
posted @ 2016-12-20 18:15  peng_gy  阅读(1068)  评论(0编辑  收藏  举报