看日志好像是spring 容器关闭了导致的,但是不确定。
Jun 10, 2016 9:36:37 AM org.springframework.scheduling.quartz.SchedulerFactoryBean startScheduler
INFO: Starting Quartz Scheduler now
Jun 10, 2016 9:36:37 AM org.springframework.context.support.ClassPathXmlApplicationContext doClose
INFO: Closing org.springframework.context.support.ClassPathXmlApplicationContext@4411d970: startup date [Fri Jun 10 09:36:36 CST 2016]; root of context hierarchy
Jun 10, 2016 9:36:37 AM org.springframework.context.support.DefaultLifecycleProcessor stop
INFO: Stopping beans in phase 2147483647
Jun 10, 2016 9:36:37 AM org.springframework.scheduling.quartz.SchedulerFactoryBean destroy
INFO: Shutting down Quartz Scheduler
以下是spring配置:
<bean id="sendMailTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"
p:jobDetail-ref="jobDetail"
p:cronExpression="* * * * * ?"
/>
<bean id="scheduler" lazy-init="false" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="sendMailTrigger"/>
</list>
</property>
</bean>
p:targetObject-ref="mailServer"
p:targetMethod="sendMail"
p:concurrent="false"/>