title: How to wire a Quartz Scheduler into my Spring context?
body: <p>I have an application in which I want to use a Quartz <code>Scheduler</code> object. I've read the Spring documentation regarding this and they suggest to use a <code>SchedulerFactoryBean</code> like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"&gt;
      &lt;property name="autoStartup"&gt;
          &lt;value&gt;true&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="configLocation" value="classpath:quartz.properties" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>The config looks like this:</p>
  
  <pre><code>org.quartz.scheduler.skipUpdateCheck = true
  org.quartz.scheduler.instanceName = MyQuartzScheduler
  org.quartz.scheduler.jobFactory.class = org.quartz.simpl.SimpleJobFactory
  org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
  org.quartz.threadPool.threadCount = 5
  log4j.rootLogger=INFO, stdout
  log4j.logger.org.quartz=DEBUG
  log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
  </code></pre>
  
  <p>Now if i want to inject <code>schedulerFactoryBean</code> into one of my objects I get an exception stating:</p>
  
  <p><code>Could not convert constructor argument value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean]:</code></p>
  
  <p>Why do I get a <code>StdScheduler</code> instead of a <code>schedulerFactoryBean</code>? Do I miss a configuration step?</p>