<!-- 定义调用对象和调用对象的方法 -->
<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="doTimeCheckPW"/>
<ref ..../>
</list>
</property>
</bean>