title: Best practice for creation scheduled methods in spring boot
body: <p>What is best way for schedulers creations from next(or your variant):</p>
  
  <p>1) For one scheduled  method create one component and call service from this mrthod:</p>
  
  <pre><code>@Component
  public class MyScheduler {
  
      private final MyService myService;
  
      public MyScheduler(MyService myService) {
          this.myService= myService;
      }
  
      @Scheduled(fixedDelay = 1L)
      public void process() {
       myService.startSomethig();
      }
  }
  </code></pre>
  
  <p>2) Create one component for all scheduled methods and start service for concrete method:</p>
  
  <pre><code>@Component
  public class MySchedulers {
  
      private final MyService1 myService1;
      private final MyService2 myService2;
      private final MyService3 myService3;
  
      public MySchedulers (MyService1 myService1, MyService2 myService2, MyService3 myService3) {
          this.myService1 = myService1;
          this.myService2 = myService2;
          this.myService3 = myService3;
      }
  
      @Scheduled(fixedDelay = 100L)
      public void process() {
       myService1.startSomethig();
      }
  
       @Scheduled(fixedDelay = 666L)
      public void process() {
       myService2.startAny();
      }
  
      @Scheduled(fixedDelay = 999L)
      public void process() {
       myService3.startAll();
      }
  }
  </code></pre>
  
  <p>3) Create cheduled method in each concreate service:</p>
  
  <pre><code>@Service
  public class MyServiceImpl implements MyService {
  
       //filds, constructor
  
      @Scheduled(fixedDelay = 100L)
      public void process() {
         startSomethig();
      }
  
      @Transactional
      @Override
      public void startSomethig() {
          //...
      }
  </code></pre>
  
  <p>Which approach is better? maybe there are others? I will be glad to hear your opinion</p>