<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
        "http://www.springframework.org/dtd/spring-beans.dtd">
 
<beans>
<!-- This is your job bean-->
<bean id="checkMailJobBean"
    class="com.harinair.jobs.CheckMailJobBean"
    autowire="byName" >
  <!-- Ref to other beans. Add more if needed -->
  <property name="serviceLocator">
    <ref bean="serviceLocator" />
  </property>
</bean>
<!-- Define the bean that delegates the work to the real job bean -->
<bean name="checkMailJob" class="org.springframework.scheduling.quartz.JobDetailBean">
  <property name="jobClass" value="com.harinair.jobs.DelegatingJobBean"/>
  <property name="jobDataAsMap">
    <map>
      <!-- This specifies the actual job bean name -->
      <entry key="job.bean.name" value="checkMailJobBean"/>
      <!-- Any other job data map entries required by your job -->
      <entry key="sdtl.file.prefix" value="sdtl_"/>
    </map>
  </property>
</bean>
<!-- Associate the delegating job bean with a trigger -->
<bean id="checkMailTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
  <property name="jobDetail" ref="checkMailJob"/>
  <!-- run every morning at 6:30 AM -->
  <property name="cronExpression" value="0 30 6 * * ?"/>
</bean>
    
  <!-- Define the scheduler with the list of triggers -->
  <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
  <property name="triggers">
    <list>
      <ref bean="checkMailTrigger"/>
    </list>
  </property>
  <!-- Scheduler context key we use this in delegating job bean -->
  <property name="applicationContextSchedulerContextKey">
      <value>applicationContext</value>
  </property>
</bean>
</beans>
