title: Can't launch Spring TaskScheduler from Spring Batch Admin app
body: <p>I have a spring batch admin project (1.3.0.RC1) and I'm trying to enable a TaskScheduler to run a job using a cron expression. </p>
  
  <p>I have one project for spring batch admin and I have another project with my batch job. I can execute the job just fine through the admin console manually (meaning it loads fine and works). The job never executes on the cron schedule though. </p>
  
  <p>If I configure a java class with a main method and run it as a java application using the same job xml file, the job will run on the cron schedule (In other words, run the job outside of the Spring batch admin console). This should also verify that the xml configuration is okay.</p>
  
  <p>this works:
  project2 app.java</p>
  
  <pre><code>public static void main(String[] args) {
      String springConfig = "META-INF/spring/batch/jobs/scheduleTest.xml";
      ApplicationContext context = new ClassPathXmlApplicationContext(springConfig);
  }
  </code></pre>
  
  <p>project2 META-INF/spring/jobs/scheduleTest.xml</p>
  
  <pre><code>    &lt;job id="test-job"
          xmlns="http://www.springframework.org/schema/batch"&gt;
          &lt;step id="testJob"&gt;
              &lt;tasklet transaction-manager="transactionManager" ref="testOutput"/&gt;
          &lt;/step&gt;
      &lt;/job&gt;
  
  
      &lt;bean id="testOutput" class="com.default.test.testOutput" /&gt;
  
  
      &lt;task:scheduled-tasks&gt;
          &lt;task:scheduled ref="runIt" method="run" cron="30 * * * * ?" /&gt;
      &lt;/task:scheduled-tasks&gt;
  
      &lt;bean id="runIt" class="com.default.scheduler.RunScheduler"&gt;
          &lt;property name="job" ref="test-job" /&gt;
          &lt;property name="jobLauncher" ref="jobLauncher"/&gt;
          &lt;property name="runCron" value="true" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>The job runs every 30 seconds and prints some test output to the console. </p>
  
  <p>Doesn't work:
  When I run the Spring Batch Admin console, project2 gets packaged with project1, the job.xml file becomes part of the classpath, and the job is registered in the console and is launchable. I can run it from the console and it works fine, but it doesn't run at the scheduled time automatically. It also doesn't start running on the scheduled time after I manually execute it.</p>
  
  <p>Does anyone see what I'm doing wrong here? Any pointers would be greatly appreciated. Or if anyone knows of an example of using the Spring TaskScheduler (not quartz) in SBA, that would also be helpful. Thanks in advance. My guess is that cron expression is getting stored into an application context that no longer exists or isn't known to the SBA console.</p>