<!--需要执行的 job-->
<bean id="testJob" class="com.vanceinfo.common.quartz.TestJob"></bean>
<!---->
<bean id="checkTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<!--执行那个job-->
<property name="jobDetail" ref="testJob"></property>
<!--job执行规则-->
<property name="cronExpression" value="0/5*****?"></property>
</bean>
<!--启动jbo的主函数 -->
<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<ref bean="checkTrigger"/>
</property>
</bean>
--job 执行的类
public class TestJob implements StatefulJob{
@Override
public void execute(JobExecutionContext jctx) throws JobExecutionException {
}
}
<bean id="testJob" class="com.vanceinfo.common.quartz.TestJob"></bean>
<!---->
<bean id="checkTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<!--执行那个job-->
<property name="jobDetail" ref="testJob"></property>
<!--job执行规则-->
<property name="cronExpression" value="0/5*****?"></property>
</bean>
<!--启动jbo的主函数 -->
<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<ref bean="checkTrigger"/>
</property>
</bean>
--job 执行的类
public class TestJob implements StatefulJob{
@Override
public void execute(JobExecutionContext jctx) throws JobExecutionException {
}
}