Quartz configuration 1.6 & 2.2, quartz1.6
Quartz 2.2.1 Configuration
<! -- Start trigger configuration start -->
<Bean name = "startQuertz" lazy-init = "false" autowire = "no" class = "org. springframework. scheduling. quartz. SchedulerFactoryBean">
<Property name = "triggers">
<List>
<Ref bean = "myJobTrigger"/>
</List>
</Property>
</Bean>
<! -- The trigger configuration ends -->
<! -- Quartz-2.x configuration -->
<Bean id = "myJobTrigger" class = "org. springframework. scheduling. quartz. CronTriggerFactoryBean">
<Property name = "jobDetail">
<Ref bean = "myJobDetail"/>
</Property>
<Property name = "cronExpression">
<Value> 0 0 0 **? </Value>
</Property>
</Bean>
<! -- Scheduling configuration ended -->
<! -- Start job configuration -->
<Bean id = "myJobDetail" class = "org. springframework. scheduling. quartz. MethodInvokingJobDetailFactoryBean">
<Property name = "targetObject">
<Ref bean = "myJob"/>
</Property>
<Property name = "targetMethod">
<Value> work </value>
</Property>
</Bean>
<! -- Job configuration ends -->
<! -- Working bean -->
<Bean id = "myJob" class = "huihai. sims. base. tool. QuartzTool"/>
Quartz 1.6.0 Configuration
<Bean id = "jobDetail" class = "org. springframework. scheduling. quartz. JobDetailBean">
<! -- Your scheduled task processing class -->
<Property name = "jobClass" value = "com. huihai. action. DisposeAnalysisAction"/>
<Property name = "jobDataAsMap">
<Map>
<Entry key = "commonBusinessSer">
<Ref bean = "commonBusinessSer"/>
</Entry>
</Map>
</Property>
</Bean>
<Bean id = "trigger" class = "org. springframework. scheduling. quartz. CronTriggerBean">
<Property name = "jobDetail" ref = "jobDetail"/>
<Property name = "cronExpression" value = "0 0 2 **? "/>
</Bean>
<! -- In the general management class, if lazy-init = 'false' is set, the container starts and runs the scheduling program. -->
<Bean id = "startQuertz" class = "org. springframework. scheduling. quartz. SchedulerFactoryBean" lazy-init = "false">
<Property name = "triggers">
<List>
<! -- Job scheduler. Other schedulers can be added to the list -->
<Ref bean = "trigger"/>
</List>
</Property>
</Bean>