项目

一般

简介

功能 #666 » spring-quartz.xml.txt

王 宁, 2020-10-28 13:52

 
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> 
5
<!-- 定义发送邮件任务 -->
6
    <bean id="checkSendEmailStatusTask"
7
          class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
8
        <property name="targetObject" ref="checkSendEmailStatusScheduler"/>
9
        <property name="targetMethod" value="execute"/>
10
        <property name="concurrent" value="false"/>
11
    </bean>
12
    <!-- 定义邮件发送计划触发器 -->
13
    <bean id="checkSendEmailStatusTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
14
        <property name="jobDetail" ref="checkSendEmailStatusTask"/>
15
        <property name="cronExpression" value="0 * * * * ?"/>
16
    </bean>
17

    
18
    <!-- 定义发送站内信任务 -->
19
    <bean id="checkSendInternalLetterTask"
20
          class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
21
        <property name="targetObject" ref="checkSendInternalLetterScheduler"/>
22
        <property name="targetMethod" value="execute"/>
23
        <property name="concurrent" value="false"/>
24
    </bean>
25
    <!-- 定义站内信发送计划触发器 -->
26
    <bean id="checkSendInternalLetterTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
27
        <property name="jobDetail" ref="checkSendInternalLetterTask"/>
28
        <property name="cronExpression" value="0 0/5 * * * ?"/>
29
    </bean>
30

    
31
    <!-- 定义发送库存警报站内信任务 -->
32
    <bean id="checkWhsStockTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
33
        <property name="targetObject" ref="checkWhsStockScheduler"/>
34
        <property name="targetMethod" value="execute"/>
35
        <property name="concurrent" value="false"/>
36
    </bean>
37
    <!-- 定义发送安全库存站内信触发器 -->
38
    <bean id="checkWhsStockTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
39
        <property name="jobDetail" ref="checkWhsStockTask"/>
40
        <!-- 每五分钟触发 -->
41
        <property name="cronExpression" value="0 0/5 * * * ? "/>
42
    </bean>
43
     <!-- 定义发送客户赔偿付款完成站内信任务 -->
44
    <bean id="checkSendEmailPayedTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
45
        <property name="targetObject" ref="checkSendEmailPayedScheduler"/>
46
        <property name="targetMethod" value="execute"/>
47
    </bean>
48
    <!-- 定义发送客户赔偿付款完成站内信触发器 -->
49
    <bean id="checkSendEmailPayedTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
50
        <property name="jobDetail" ref="checkSendEmailPayedTask"/>
51
        <!-- 每一小时触发 -->
52
        <property name="cronExpression" value="0 0/60 * * * ? "/>
53
    </bean>
54
    <!-- 定义发送客户合同站内信任务 -->
55
    <bean id="checkCustomerContactTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
56
        <property name="targetObject" ref="checkCustonerContractScheduler"/>
57
        <property name="targetMethod" value="execute"/>
58
    </bean>
59
    <!-- 定义发送客户合同站内信触发器 -->
60
    <bean id="checkCustomerContactTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
61
        <property name="jobDetail" ref="checkCustomerContactTask"/>
62
        <!-- 每天凌晨触发 -->
63
        <property name="cronExpression" value="0 0 0 * * ? "/>
64
    </bean>
65
    <!-- 定义发送采购申请站内信任务 -->
66
    <bean id="checkPurchaseRequestTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
67
        <property name="targetObject" ref="checkPurchaseRequestScheduler"/>
68
        <property name="targetMethod" value="execute"/>
69
        <property name="concurrent" value="false"/>
70
    </bean>
71
<!-- 定义发送采购申请站内信触发器 -->
72
    <bean id="checkPurchaseRequestTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
73
        <:property name="jobDetail" ref="checkPurchaseRequestTask"/>
74
        <property name="cronExpression" value="0 0/5 * * * ?"/>
75
    </bean>
76
    <!-- 定义发送重箱发货记录站内信任务 -->
77
    <bean id="checkDeliveryRecordTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
78
        <property name="targetObject" ref="checkDeliveryRecordScheduler"/>
79
        <property name="targetMethod" value="execute"/>
80
    </bean>
81
    <!-- 定义发送重箱发货记录站内信触发器 -->
82
    <bean id="checkDeliveryRecordTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
83
        <property name="jobDetail" ref="checkDeliveryRecordTask"/>
84
        <!-- 每周星期日凌晨1点 -->
85
        <property name="cronExpression" value="0 0 1 ? * 1"/>
86
    </bean>
87
    <!-- 定义发送60天内运单回收问询需要入库回执单站内信触发器 -->
88
    <bean id="checkInboundReceiptTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
89
        <property name="jobDetail" ref="checkInboundReceiptTask"/>
90
        <!-- 每日凌晨2点 -->
91
        <property name="cronExpression" value="0 0 2 * * ?"/>
92
    </bean>
93
    <!-- 定义发送60天内运单回收问询需要入库回执单站内信任务 -->
94
    <bean id="checkInboundReceiptTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
95
        <property name="targetObject" ref="checkInboundReceiptScheduler"/>
96
        <property name="targetMethod" value="execute"/>
97
    </bean>
98
    <!-- 定义发送PDA入库收货外部邮件触发器 -->
99
    <bean id="checkWarehousingReceivingTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
100
        <property name="jobDetail" ref="checkWarehousingReceivingTask"/>
101
        <!-- 每日凌晨2点 -->
102
        <property name="cronExpression" value="0 0 2 * * ?"/>
103
    </bean>
104
    <!-- 定义发送PDA入库收货外部邮件任务 -->
105
    <bean id="checkWarehousingReceivingTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
106
        <property name="targetObject" ref="checkWarehousingReceivingScheduler"/>
107
        <property name="targetMethod" value="execute"/>
108
    </bean>
109

    
110
    <!-- 定义客户占箱时间的数据同步触发器 -->
111
    <bean id="customerOccupancyTimeTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
112
        <property name="jobDetail" ref="customerOccupancyTimeTask"/>
113
        <!-- 每日凌晨2点 -->
114
        <property name="cronExpression" value="0 0 2 * * ?"/>
115
    </bean>
116

    
117
    <!-- 定义客户占箱时间的数据同步任务 -->
118
    <bean id="customerOccupancyTimeTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
119
        <property name="targetObject" ref="customerOccupancyTimeScheduler"/>
120
        <property name="targetMethod" value="execute"/>
121
    </bean>
122

    
123
    <!-- 同步业务伙伴关系触发器 -->
124
    <bean id="uploadPartnerRelationTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
125
        <property name="jobDetail" ref="uploadPartnerRelationTask"/>
126
        <!-- 每日凌晨5点 -->
127
        <property name="cronExpression" value="0 0 5 * * ?"/>
128
    </bean>
129
   <!-- 同步业务伙伴关系定时任务 -->
130
    <bean id="uploadPartnerRelationTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
131
        <property name="targetObject" ref="uploadPartnerRelationToCustomerPlatformScheduler"/>
132
        <property name="targetMethod" value="execute"/>
133
    </bean>
134

    
135
    <!-- 定义客户重箱发货明细表(客户PDA录入)同步任务 -->
136
    <bean id="checkCustomerBoxDeliveryTask"
137
          class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
138
        <property name="targetObject" ref="updateCustomerBoxDeliveryScheduler"/>
139
        <property name="targetMethod" value="execute"/>
140
    </bean>
141
    <!-- 定义客户重箱发货明细表(客户PDA录入)同步触发器 -->
142
    <bean id="checkCustomerBoxDeliveryTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
143
        <property name="jobDetail" ref="checkCustomerBoxDeliveryTask"/>
144
        <!-- 每日凌晨2点 -->
145
        <property name="cronExpression" value="0 0 2 * * ?"/>
146
    </bean>
147

    
148
    <!-- 定义客户超期未付款冻结交货触发器 -->
149
    <bean id="checkBlockCustomerDeliveryTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
150
        <property name="targetObject" ref="checkBlockCustomerDeliveryScheduler"/>
151
        <property name="targetMethod" value="execute"/>
152
    </bean>
153

    
154
    <!-- 定义客户超期未付款冻结交货触发器 -->
155
    <bean id="checkBlockCustomerDeliveryTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
156
        <property name="jobDetail" ref="checkBlockCustomerDeliveryTask"/>
157
        <!-- 每日凌晨1点30 -->
158
        <property name="cronExpression" value="0 30 1 * * ?"/>
159
    </bean>
160

    
161
    <!-- 定义发送新增客户且有首次重箱发货记录站内信任务 -->
162
    <bean id="checkNewCustomerTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
163
        <property name="targetObject" ref="checkNewCustomerScheduler"/>
164
        <property name="targetMethod" value="execute"/>
165
    </bean>
166
    <!-- 定义发送新增客户且有首次重箱发货记录站内信触发器 -->
167
    <bean id="checkNewCustomerTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
168
        <property name="jobDetail" ref="checkNewCustomerTask"/>
169
        <!-- 每日凌晨2点 -->
170
        <property name="cronExpression" value="0 0 2 * * ?"/>
171
    </bean>
172
    <!-- 定义超过90天没有更新回收问询计划或回收问询任务站内信任务 -->
173
    <bean id="checkCustomerNotUpdateTask"
174
          class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
175
 <property name="targetObject" ref="checkCustomerNoRecScheduler"/>
176
        <property name="targetMethod" value="execute"/>
177
    </bean>
178
    <!-- 定义超过90天没有更新回收问询计划或回收问询任务站内信触发器 -->
179
    <bean id="checkCustomerNotUpdateTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
180
        <property name="jobDetail" ref="checkCustomerNotUpdateTask"/>
181
        <!-- 每日凌晨2点 -->
182
        <property name="cronExpression" value="0 0 2 * * ?"/>
183
    </bean>
184

    
185
    <!-- 定义自其最近重箱发货之日起,超过90天都没有回收问询或回收任务站内信任>务 -->
186
    <bean id="checkCustomerNoRecTask"
187
          class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
188
        <property name="targetObject" ref="checkCustomerNoRecScheduler"/>
189
        <property name="targetMethod" value="execute"/>
190
    </bean>
191
    <!-- 定义自其最近重箱发货之日起,超过90天都没有回收问询或回收任务站内信触发>器 -->
192
    <bean id="checkCustomerNoRecTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
193
        <property name="jobDetail" ref="checkCustomerNoRecTask"/>
194
        <!-- 每日凌晨2点 -->
195
        <property name="cronExpression" value="0 0 2 * * ?"/>
196
    </bean>
197

    
198
    <!-- 启动Quartz  -->
199
    <bean id="startQuartz" lazy-init="false" autowire="no"
200
          class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
201
        <property name="startupDelay" value="5"/>
202
        <property name="triggers">
203
            <list>
204
                <!--<ref bean="syncSeeyonHrTrigger"/>-->
205
                <!--<ref bean="checkWhsStockTrigger"/>-->
206
                <!--<ref bean="checkCustomerContactTrigger"/>-->
207
                <!--<ref bean="checkSendInternalLetterTrigger"/>-->
208
                <!--<ref bean="checkSendEmailStatusTrigger"/>-->
209
                <!--<ref bean="checkPurchaseRequestTrigger"/>-->
210
                <!--<ref bean="checkDeliveryRecordTrigger"/>-->
211
                <!--<ref bean="checkInboundReceiptTrigger"/>-->
212
                <!--<ref bean="checkWarehousingReceivingTrigger"/>-->
213
                <!--<ref bean="customerOccupancyTimeTrigger"/>-->
214
                <!--<ref bean="checkSendEmailPayedTrigger"/>-->
215
                <!--<ref bean="uploadPartnerRelationTrigger"/>-->
216
                <!--<ref bean="checkNewCustomerTrigger"/>-->
217
                <!--<ref bean="checkCustomerNotUpdateTrigger"/>-->
218
                <!--<ref bean="checkCustomerNoRecTrigger"/>-->
219
                <!--<ref bean="checkCustomerBoxDeliveryTrigger"/>-->
220
                <!--<ref bean="checkBlockCustomerDeliveryTrigger"/>-->
221
            </list>
222
        </property>
223
        <property name="taskExecutor" ref="executor"/>
224
 </bean>
225
    <!-- Threaded actuator configuration, for task register-->
226
    <bean id="executor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
227
        <property name="corePoolSize" value="10"/>
228
        <property name="maxPoolSize" value="200"/>
229
        <property name="queueCapacity" value="800"/>
230
        <property name="rejectedExecutionHandler">
231
            <bean class="java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy"/>
232
        </property>
233
    </bean>
234

    
235
</beans>
(1-1/7)