title: Grails and Quartz on Tomcat: how to gracefully shutdown
body: <p>I have a Grails application with the following <code>grails-app/conf/QuartzConfig.groovy</code>:</p>
  
  <pre><code>quartz {
      autoStartup = true
      jdbcStore = false
      waitForJobsToCompleteOnShutdown = false
      exposeSchedulerInRepository = false
      interruptJobsOnShutdown = true
  
      props {
          scheduler.skipUpdateCheck = true
      }
  }
  </code></pre>
  
  <p>However every time I shut down Tomcat, there will be a process left hanging which I'll have to kill. According to the above config file this should not happen. Is there another property I should be using to achieve this?</p>
  
  <p>Furthermore upon Tomcat startup I see 10 lines of (for the 10 Quartz threads):</p>
  
  <blockquote>
    <p>SEVERE: The web application [/test] appears to have started a thread
    named [DefaultQuartzScheduler_Worker-5] but has failed to stop it.
    This is very likely to create a memory leak.</p>
  </blockquote>
  
  <p>The above also doesn't change with the properties in the config file, which is seemingly related to the hanging process. Any help would be greatly appreciated.</p>