Intro Quartz Versus FixedRate Versus FixedDelay Posted on 2022-04-14 Edited on 2024-07-03 In Schedule Views: Disqus: Symbols count in article: 517 Reading time ≈ 1 mins.Intro Quartz Versus FixedRate Versus FixedDelay這篇介紹Quartz Versus FixedRate Versus FixedDelay.Compare12345678910111213在使用quartz做排程時,要注意在job class的定義上必須加上@DisallowConcurrentExecution的annotation,才不會一直重複執行。以每秒排程為例有加@DisallowConcurrentExecution -> 會等該job執行完才會進行下一個schedule沒加@DisallowConcurrentExecution -> 不會等該job執行完,在每秒繼續執行下一個schedulequartz和ScheduleAtFixedRate or ScheduleWithFixedDelay建議使用情境:1.quartz用在固定時間的排程使用 ex.每天中午12點執行一次排程2.ScheduleAtFixedRate or ScheduleWithFixedDelay: rate:等待rate時間就執行task delay:該task執行完後,delay設定時間再繼續執行下一個task