标签:
<!-- 定义调用对象和调用对象的方法 --> <bean id="jobTaskCheckPW" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <!-- 调用的类 --> <property name="targetObject"> <ref bean="CheckPWTimer"/> </property> <!-- 调用类中的方法 --> <property name="targetMethod"> <value>pwdWarn</value> </property> </bean> <!-- 定义触发时间 --> <bean id="doTimeCheckPW" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail"> <ref bean="jobTaskCheckPW"/> </property> <!-- cron表达式 --> <property name="cronExpression"> <!-- 每隔一分钟执行一次 --> <!--<value>0 0/1 * * * ?</value>--> <!-- 每月的每日凌晨8点执行 --> <value>0 0 8 * * ?</value> </property> </bean> <bean id="schdulerFactory" lazy-init="false" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="stat_cronTrigger" /> <ref bean="job_cronTrigger" /> <ref bean="seller_cronTrigger" /> <ref bean="seller_cronTrigger_week" /> <ref bean="doTimeCheckPW"/> </list> </property> </bean>
标签:
原文地址:http://www.cnblogs.com/sflik/p/4748555.html