JAVA定时任务

在web.xml文件中启动:

 

<!-- quartz启动 begin -->
 <servlet>
  <servlet-name>QuartzInitializer</servlet-name>
  <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
  <init-param>
   <param-name>shutdown-on-unload</param-name>
   <param-value>true</param-value>
  </init-param>
  <init-param>
   <param-name>config-file</param-name>
   <param-value>quartz.properties</param-value>
  </init-param>
  <load-on-startup>3</load-on-startup>
 </servlet>
 <!-- quartz启动 end -->

你可能感兴趣的:(java)