title: Problems using spring @Scheduled
body: <p>I have three methods on my project annotated with @Scheduled, being one of them a cron expression and the other two are fixed delay. The annotations look like:</p>
  
  <p>Method 1:</p>
  
  <pre><code>@Scheduled(fixedDelay = 20000)
  @Async
  protected void checkBrokenEngines() {
  </code></pre>
  
  <p>Method 2:</p>
  
  <pre><code>@Scheduled(fixedRate = 20000)
  @Async
  public void checkAvailableTasks() throws Exception {
  </code></pre>
  
  <p>Method 3:</p>
  
  <pre><code>@Scheduled(cron = "0 0 2 * * ?")
  protected void deleteOldData() {
  </code></pre>
  
  <p>Previously I had a problem that when the <code>checkBrokenEngines</code> and <code>checkAvailableTasks</code> methods were slow to be executed, the next executions did not happen until the previous one ended. Reading the documentation and some topics here from the StackOverflow, I saw that my project had some wrong <strong>pool size</strong> settings and the methods were not annotated with <strong>async</strong>. (Async was for the next execution start even if the old one doesn't end, as this does not cause any problems in my application)</p>
  
  <p>Now another problem has come up, which is my question: </p>
  
  <p>When the <code>deleteOldData()</code> method is executed, neither of the other two methods will run until it finishes. After seeing that this method was blocking the execution of the other two, I annotated the method as async and after that, even if this method takes time to be executed, the other two are always invoked correctly within the stipulated time. Why? In my understanding, this should not happen since those methods are noted with async and the pool has enough space to execute them.</p>
  
  <p>PS: <code>deleteOldData()</code> cannot be async. It must start just after the previous execution has been completed.</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>Async executor config:</p>
  
  <pre><code>@Override    
  public AsyncTaskExecutor getAsyncExecutor() {
      log.debug("Creating Async Task Executor");
      ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
      executor.setCorePoolSize(50);
      executor.setMaxPoolSize(50);
      executor.setQueueCapacity(10000);        
      return new ExceptionHandlingAsyncTaskExecutor(executor);
  }
  </code></pre>