<property name="triggers">
<list>
<ref bean="cronTrigger"/>
<ref bean="cronTrigger1"/>
<ref bean="cronTrigger2"/>
</list>
</property>
<property name="applicationContextSchedulerContextKey" value="applicationContextKey"/>
<property name="configLocation" value="classpath:quartz.properties"/>
<property name="cronExpression" value="0 0/2 8-21 *,* * ?"/>
</bean>
每次启动tomcat后调度任务都会立即执行一次,然后到定时时间再执行一次,怎样才能不让tomcat启动后立即执行,而是在定时的时间执行一次??
我们是让它不随着tomcat启动,延迟一两分钟之后在启动任务。
好像不行,只能配置延迟加载时间
Tomcat中不建议使用定时器。建议另起进程来处理。