spring-quartz.xml
2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<bean id="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="applicationContextSchedulerContextKey" value="applicationContextKey" />
<property name="schedulerName" value="CRM-SCHEDULER"></property>
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value="classpath:quartz/quartz.properties" />
<property name="waitForJobsToCompleteOnShutdown" value="true"></property>
<property name="triggers">
<list>
<ref bean="quartzConditionTagTrigger"/>
<ref bean="quartzTemplateTagTrigger"/>
</list>
</property>
</bean>
<bean id="quartzConditionTagTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="name" value="ConditionTagTrigger"/>
<property name="group" value="DAILY"/>
<property name="cronExpression" value="0 0 1 * * ? *"/>
<property name="jobDetail" ref="quartzConditionTagJob"/>
</bean>
<bean id="quartzConditionTagJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="name" value="ConditionTagJob"/>
<property name="group" value="DAILY"/>
<property name="jobClass" value="cn.runsa.crmapp.customer.task.CustomerConditionTagTask"/>
<property name="description" value="\u6BCF\u65E5\u5347\u7EA7\u4EFB\u52A1"/>
</bean>
<bean id="quartzTemplateTagTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="name" value="TemplateTagTrigger"/>
<property name="group" value="DAILY"/>
<property name="cronExpression" value="0 0 1 * * ? *"/>
<property name="jobDetail" ref="quartzTemplateTagJob"/>
</bean>
<bean id="quartzTemplateTagJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="name" value="TemplateTagJob"/>
<property name="group" value="DAILY"/>
<property name="jobClass" value="cn.runsa.crmapp.customer.task.CustomerTemplateTagTask"/>
<property name="description" value="\u6BCF\u65E5\u5347\u7EA7\u4EFB\u52A1"/>
</bean>
</beans>