Quartz log异常

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

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(注意此项不宜设置过长,须要根据定时任务触发的时间来肯定,若每秒钟都触发,那就很差这样设置了)
相关文章
相关标签/搜索