---
title: "SchedulerFactoryBean"
author: "anyeeye"
date: "2009-07-30T11:59:25Z"
tags: []
slug: "schedulerfactorybean"
draft: false
lastmod: "2009-07-30T11:59:25Z"
id: 436118
url: "https://anyeeye.iteye.com/blog/436118"
---

&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;beans&gt;&lt;bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false"&gt;&lt;property name="startupDelay" value="10"&gt;&lt;/property&gt;&lt;property name="triggers"&gt;&lt;list&gt;&lt;!-- &lt;ref local="autoQueryCitiesTrigger" /&gt; --&gt;&lt;ref local="hotelAutoCancelTrigger"&gt;&lt;/ref&gt;&lt;ref local="timerAuditeTrigger"&gt;&lt;/ref&gt;&lt;ref local="timerAutoChangeStatusTrigger"&gt;&lt;/ref&gt;&lt;/list&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean id="autoQueryCitiesTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean"&gt;&lt;property name="jobDetail" ref="autoQueryCitiesJob"&gt;&lt;/property&gt;&lt;property name="repeatInterval" value="30000"&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean name="autoQueryCitiesJob" class="org.springframework.scheduling.quartz.JobDetailBean"&gt;&lt;property name="jobClass" value="com.hnatourism.tdos.scheduler.job.AutoQueryCitiesJobImpl"&gt;&lt;/property&gt;&lt;property name="jobDataAsMap"&gt;&lt;map&gt;&lt;entry key="hnaProcityManager" value-ref="hnaProcityManager"&gt;&lt;/entry&gt;&lt;!-- &lt;entry key="airportInfoManager" value-ref="airportInfoManager" /&gt; --&gt;&lt;entry key="springContextUtil" value-ref="SpringContextUtil"&gt;&lt;/entry&gt;&lt;/map&gt;&lt;/property&gt;&lt;property name="applicationContextJobDataKey" value="applicationContext"&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean name="autoQueryCitiesManager" class="com.hnatourism.tdos.scheduler.job.AutoQueryCitiesJobImpl"&gt;&lt;property name="hnaProcityManager" ref="hnaProcityManager"&gt;&lt;/property&gt;&lt;!-- &lt;property name="airportInfoManager" ref="airportInfoManager" /&gt; --&gt;&lt;property name="springContextUtil" ref="SpringContextUtil"&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean id="hotelAutoCancelTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean"&gt;&lt;property name="jobDetail" ref="hotelAutoCancelJob"&gt;&lt;/property&gt;&lt;property name="repeatInterval" value="300000"&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean id="timerAuditeTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"&gt;&lt;property name="jobDetail" ref="timerAuditeJob"&gt;&lt;/property&gt;&lt;property name="cronExpression"&gt;&lt;value&gt;0 0 18 * * ?&lt;/value&gt;&lt;!--每天18点0分0秒 --&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean id="timerAutoChangeStatusTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"&gt;&lt;property name="jobDetail" ref="timerAutoChangeStatusJob"&gt;&lt;/property&gt;&lt;property name="cronExpression"&gt;&lt;value&gt;0 0 0 * * ?&lt;/value&gt;&lt;!--每天0点0分0秒 --&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean name="timerAuditeJob" class="org.springframework.scheduling.quartz.JobDetailBean"&gt;&lt;property name="jobClass" value="com.hnatourism.tdos.scheduler.job.TimerAuditeJob"&gt;&lt;/property&gt;&lt;property name="applicationContextJobDataKey" value="applicationContext"&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean name="timerAutoChangeStatusJob" class="org.springframework.scheduling.quartz.JobDetailBean"&gt;&lt;property name="jobClass" value="com.hnatourism.tdos.scheduler.job.TimerAutoChangeStatusJob"&gt;&lt;/property&gt;&lt;property name="applicationContextJobDataKey" value="applicationContext"&gt;&lt;/property&gt;&lt;/bean&gt;&lt;bean name="hotelAutoCancelJob" class="org.springframework.scheduling.quartz.JobDetailBean"&gt;&lt;property name="jobClass" value="com.hnatourism.tdos.scheduler.job.AutoCancelOrderJob"&gt;&lt;/property&gt;&lt;property name="jobDataAsMap"&gt;&lt;map&gt;&lt;entry key="timeOut" value="30"&gt;&lt;/entry&gt;&lt;/map&gt;&lt;/property&gt;&lt;property name="applicationContextJobDataKey" value="applicationContext"&gt;&lt;/property&gt;&lt;/bean&gt;&lt;/beans&gt;