定时任务如何设置执行次数,我只想让他执行一次
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">
<bean id="certPublicWebJob" class="cn.org.bjca.site.business.monitorWeb.quartz.CertPublicWebScheduleJob">
<bean id="certPublicWebJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="certPublicWebServiceJob" />
<property name="targetMethod" value="doJob"></property>
<!--默认允许并发执行,设置为false 防止并发执行 发生死锁问题 -->
<property name="concurrent" value="false"/>
</bean>
<bean id="certPublicWebTriggerBean" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="certCrlScheduleJobDetail"></property>
<property name="cronExpression" value="0 */1 * * * ?"></property>
<property name="description" value="发布"></property>
</bean>
<!-- 触发器-->
<bean id="schedulerFactoryBean-em" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="certPublicWebTriggerBean"/>
</list>
</property>
</bean>
</beans>