title: Spring - Scheduled Task - Graceful Shutdown
body: <p>I have a Spring-Boot application with a bean running a scheduled task at about 1 minute intervals, and this bean has a <code>@PreDestroy</code> method. </p>
  
  <p>Is there a solution for allowing a task which is currently being executed to complete - or at least given some time to complete - before the life cycle reaches the pre-destroy phase? </p>