<!--需要定时的方法所在的类MercenaryManager-->
<bean id="mercenaryMan" class="com.hztusheng.yb.core.manager.MercenaryManager"/>
<bean id="merPhysicalMan" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="mercenaryMan"/>
</property>
<property name="targetMethod">
<!-- 定时的方法的名字 systemMercenaryPhysicalHalfPointTime-->
<value>systemMercenaryPhysicalHalfPointTime</value>
</property>
</bean>
<bean id="merPhysicalHalfTime" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="merPhysicalMan"/>
</property>
<property name="cronExpression">
<value>0 30 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * ?</value><!-- 半点,整点调用 -->
</property>
</bean>
<bean id="startQuertz" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="merPhysicalHalfTime"/><!-- 增加玩家行动力 -->
</list>
</property>
</bean>
**最后注
需要包spring-2.0.jar , quartz-all-1.6.5.jar