title: Why does spring task scheduler wait for previous task to finish?
body: <p>I have the following task scheduler setup:</p>
  
  <pre><code>&lt;bean id="Task" class="foo.bar.Task" /&gt;
  
  &lt;bean id="TaskScheduler"
    class="org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler"&gt;
      &lt;property name="waitForTasksToCompleteOnShutdown" value="true" /&gt;
      &lt;property name="poolSize" value="1000" /&gt;
  &lt;/bean&gt;
  
  &lt;task:scheduled-tasks scheduler="TaskScheduler"&gt;
    &lt;task:scheduled ref="Task" method="run" cron="*/5 * * * * *" /&gt;
  &lt;/task:scheduled-tasks&gt;
  </code></pre>
  
  <p>The Task just prints a line and sleeps for 10 seconds. With this setup, my expectation was that the task would run every 5 seconds, regardless of whether the previous task had finished it's execution (ie stopped sleeping). But that's not the case, the task runs once ever 15 seconds (the sleep time and then the next time the cron is hit).</p>
  
  <p>How can I configure this so that the task runs every 5 seconds regardless of whether the previous execution finished?</p>