spring job不能随tomcat启动运行?????
<?xml version="1.0" encoding="utf-8"?>
<quartz>
<job>
<job-detail>
<name>bookjob</name>
<group>DEFAULT</group>
<job-class>com.sky.reader.quartz.BookJob</job-class>
</job-detail>
<trigger>
<cron>
<name>bookjobtrigger</name>
<group>DEFAULT</group>
<job-name>bookjob</job-name>
<job-group>DEFAULT</job-group>
<cron-expression>0 0 0/1 * * ?</cron-expression>
</cron>
</trigger>
</job>
</quartz>
#============================================================================
# Configure Main Scheduler Properties
#============================================================================
org.quartz.scheduler.instanceName = org.quartz.scheduler.instanceId = AUTO
#============================================================================
# Configure ThreadPool
#============================================================================
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 3
org.quartz.threadPool.threadPriority = 5
#============================================================================
# Configure Plugins
#============================================================================
org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingJobHistoryPlugin
org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
org.quartz.plugin.jobInitializer.fileName = quartz_jobs.xml
org.quartz.plugin.jobInitializer.overWriteExistingJobs = true
org.quartz.plugin.jobInitializer.failOnFileNotFound = true
org.quartz.plugin.jobInitializer.scanInterval = 10
web.xml:
<servlet>
<servlet-name>QuartzInitializer</servlet-name>
<servlet-class>com.sky.reader.quartz.QuartzInitServlet</servlet-class>
<init-param>
<param-name>shutdown-on-unload</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>start-scheduler-on-load</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>2</load-on-startup>
</servlet>
tomcat启动时信息如下:
2008-09-08 10:33:55 [com.sky.reader.quartz.QuartzInitServlet]-[INFO] Quartz Initializer Servlet loaded, initializing Scheduler...
2008-09-08 10:33:55 [org.quartz.plugins.xml.JobInitializationPlugin]-[WARN] The "filename" plugin property is deprecated. Please use "filenames" in the future.
2008-09-08 10:33:55 [org.quartz.core.QuartzScheduler]-[INFO] Quartz Scheduler v.1.6.0 created.
2008-09-08 10:33:55 [org.quartz.plugins.xml.JobInitializationPlugin]-[INFO] Registering Quartz Job Initialization Plug-in.
2008-09-08 10:33:55 [org.quartz.simpl.RAMJobStore]-[INFO] RAMJobStore initialized.
2008-09-08 10:33:55 [org.quartz.impl.StdSchedulerFactory]-[INFO] Quartz scheduler 'org.quartz.scheduler.instanceId = AUTO' initialized from the specified file : 'quartz.properties' from the class resource path.
2008-09-08 10:33:55 [org.quartz.impl.StdSchedulerFactory]-[INFO] Quartz scheduler version: 1.6.0
2008-09-08 10:33:56 [org.quartz.xml.JobSchedulingDataProcessor]-[INFO] Parsing XML file: /E:/prj/sky_mobile/WebRoot/WEB-INF/classes/quartz_jobs.xml with systemId: /E:/prj/sky_mobile/WebRoot/WEB-INF/classes/quartz_jobs.xml validating: false validating schema: jar:file:/E:/prj/sky_mobile/WebRoot/WEB-INF/lib/quartz-all-1.6.0.jar!/org/quartz/xml/job_scheduling_data_1_5.xsd
2008-09-08 10:33:56 [org.quartz.xml.JobSchedulingDataProcessor]-[INFO] Scheduling 1 parsed jobs.
2008-09-08 10:33:56 [org.quartz.xml.JobSchedulingDataProcessor]-[INFO] Adding job: DEFAULT.bookjob
2008-09-08 10:33:56 [org.quartz.xml.JobSchedulingDataProcessor]-[INFO] 1 scheduled jobs.
2008-09-08 10:33:56 [org.quartz.core.QuartzScheduler]-[INFO] Scheduler org.quartz.scheduler.instanceId = AUTO_$_NON_CLUSTERED started.
2008-09-08 10:33:56 [com.sky.reader.quartz.QuartzInitServlet]-[INFO] Scheduler 已经启动........................
为什么tomcat启动时不能马上运行job?????????????