title: Using grails datasources in quartz plugin
body: <p>I want to create quartz jobs that use a JdbcStore as described in the clustering section of the <a href="http://grails-plugins.github.io/grails-quartz/guide/configuration.html" rel="nofollow">docs</a>, in Burt's example.</p>
  
  <p>The example shows how to configure quartz using a quartz.properties file.</p>
  
  <p>Now, I'd like my jdbc store to be the same database as my grails application, so that I have less settings to duplicate.</p>
  
  <p>So, assuming I manually create the required tables in my database, is it possible to use the default dataSource configured in Datasource.groovy with the quartz plugin ? </p>
  
  <p>I'm using grails 2.4.4 and quartz 1.0.2.</p>
  
  <p>In other terms, can I add my settings to QuartzConfig.groovy rather than creating a new quartz.properties file ? At least I could benefit from the separate environments settings.</p>
  
  <p>Would something like this be valid in QuartzConfig.groovy ?</p>
  
  <pre><code>quartz {
  autoStartup = true
  jdbcStore = true
  waitForJobsToCompleteOnShutdown = true
  exposeSchedulerInRepository = true
  
  props {
      scheduler.skipUpdateCheck = true
  
      threadPool.class = 'org.quartz.simpl.SimpleThreadPool'
      threadPool.threadCount = 50
      threadPool.threadPriority = 9
  
      jobStore.misfireThreshold = 60000
  
      jobStore.class = 'impl.jdbcjobstore.JobStoreTX'
      jobStore.driverDelegateClass = 'org.quartz.impl.jdbcjobstore.StdJDBCDelegate'
  
      jobStore.useProperties = false
      jobStore.tablePrefix = 'QRTZ_'
      jobStore.isClustered = true
      jobStore.clusterCheckinInterval = 5000
  
      plugin.shutdownhook.class = 'org.quartz.plugins.management.ShutdownHookPlugin'
      plugin.shutdownhook.cleanShutdown = true
  
      jobStore.dataSource = 'myDS'
      // [...]
  }
  </code></pre>