How to perform timing tasks, and distributed task scheduling

Stand-alone: ​​quartz, or spring task, or use @Scheduled annotation.
If you use @Scheduled fixedDelay and thread pool, you can execute tasks 1 and 2 in cycles

Distributed task scheduling system: elastic-job 3 , xxl-job and other
elastic-job: based on quartz, coordinated by zookeeper, and elect leader. The leader performs task fragmentation, and the fragmentation logic includes modulo, etc.


  1. About the understanding of fixedDelay and fixedRate in @Scheduled↩︎

  2. Spring practice regular tasks of ↩︎

  3. Elastic-Job Task Scheduler distributed - service middleware ↩︎

Guess you like

Origin blog.csdn.net/qq_23204557/article/details/115192329