1. 程式人生 > 其它 >This scheduler instance is still active but was recovered by another instance in the cluster

This scheduler instance is still active but was recovered by another instance in the cluster

技術標籤:後端技術quartz

報錯資訊

WARN org.quartz.impl.jdbcjobstore.JobStoreSupport.findFailedInstances(JobStoreSupport.java:3396) 
This scheduler instance (XXX) is still active but was recovered by another instance in the cluster. 
This may cause inconsistent behavior.

產生原因
使用Quartz時叢集下的各機器時間不同步,在相同的資料庫(叢集)下,存在另外一個相同的應用(可能是測試或其他開發環境)已經在執行該定時任務,Quartz為保證資料一致性,後啟動的定時任務不會執行。


解決方案
關掉另外一個地方的定時任務,重啟當前應用。