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.