spring多个定时任务job.xml配置
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"default-lazy-init="false"><bean id="job1" />//任务1<bean id="job2" />//任务2<bean id="jobDetail_1" /> </property> <property name="targetMethod"> <value>jobMethod1</value>//执行的方法 </property></bean><bean id="jobDetail_2" /> </property> <property name="targetMethod"> <value>jobMethod2</value> </property></bean><bean id="cronTrigger_1" /> </property> <property name="cronExpression"> <value>0 0 0 * * ?</value>//每天凌晨12点执行一次 </property></bean><bean id="cronTrigger_2" /> </property> <property name="cronExpression"> <value>0 0 */1 * * ?</value>//每小时执行一次 </property></bean><bean /> <ref local="cronTrigger_2" /> </list> </property></bean></beans>
?