quartz 不执行也不报错是怎么回事
<!-- 调度任务 --><bean id="task" class="org.springframework.sche易做图ng.quartz.JobDetailBean">
<property name="jobClass" value="com.sms.util.EveryWeekTask"></property>
</bean>
<!-- 按频率调度 -->
<bean id="易做图Trigger" class="org.springframework.sche易做图ng.quartz.SimpleTriggerBean">
<property name="jobDetail" ref="task"></property>
<property name="repeatCount" value="3"></property>
<property name="repeatInterval" value="20"></property>
</bean>
<!-- 按时间点调度 -->
<bean id="cronTrigger" class="org.springframework.sche易做图ng.quartz.CronTriggerBean">
<property name="jobDetail" ref="task"></property>
<property name="cronExpression" value="0/10 * * * * ?"></property>
</bean>
<bean id="factory" class="org.springframework.sche易做图ng.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="易做图Trigger"/>
<ref bean="cronTrigger"/>
</list>
</property>
</bean>
任务类
public class EveryWeekTask extends QuartzJobBean{
@Override
protected void executeInternal(JobExecutionContext arg0)
throws JobExecutionException {
System.out.println("111111");
}
}
不执行也不报错
请高手指教
Quartz 不执行 --------------------编程问答-------------------- --------------------编程问答-------------------- 你实例化了一个任务对象,却木有调用它。
<task:scheduled-tasks>
<task:scheduled ref="task" method="run" cron="0 0/15 * * * ?"/> <!-- run it every 15 minutes -->
</task:scheduled-tasks>
补充:Java , Web 开发