quartz 时间调度器 配置文件
来源:互联网 发布:云计算岗位多吗 编辑:程序博客网 时间:2024/05/22 05:23
废话不多说直接上配置文件
<?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"xmlns:tx="http://www.springframework.org/schema/tx" xmlns:cache="http://www.springframework.org/schema/cache"xmlns:aop="http://www.springframework.org/schema/aop"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.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"default-lazy-init="false"><!-- 配置需要定时的bean类 --><bean id="festivalRemindTask" class="com.cl.business.khkq.util.festivalRemindTask"></bean><!-- 工程交付周期表 --><bean id="periodChartTask" class="com.cl.business.pcdm.util.PeriodChartTask"></bean><!-- 配置任务的具体类和方法 --><bean id="startWorkTask"class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"><!-- 要调用的bean --><property name="targetObject" ref="festivalRemindTask"></property><!-- 要调用的Method --><property name="targetMethod" value="festivalRemind"></property><!-- <property name="targetMethod" value="nsTime"></property> <property name="targetMethod" value="nsWarnTime"></property> <property name="targetMethod" value="validDate"></property> --><!-- <property name="targetMethod"> <value>festivalRemind</value> <value>nsTime</value> <value>nsWarnTime</value> <value>validDate</value> </property> --><!-- 是否并发,false表示 如果发生错误也不影响下一次的调用 --><property name="concurrent" value="false"></property></bean><bean id="startPeriodChartTask"class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"><!-- 要调用的bean --><property name="targetObject" ref="periodChartTask"></property><!-- 要调用的Method --><property name="targetMethod" value="runTask"></property><!-- 是否并发,false表示 如果发生错误也不影响下一次的调用 --><property name="concurrent" value="false"></property></bean><!-- 配置一个触发器 --><bean id="startWorkTrigger"class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"><property name="jobDetail" ref="startWorkTask"></property><!-- 0 0/1 * * * ? 每分钟执行一次 --><property name="cronExpression" value="0 0 10 * * ?"></property> <!--每天的上午十点触发"0 45 11 * * ?" --><!-- <property name="cronExpression" value="0 0/1 * * * ?"></property> --><!--每五分钟执行一次 --></bean><!--工程交付周期表触发器 --><bean id="periodChartTaskTrigger"class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"><property name="jobDetail" ref="startPeriodChartTask"></property><!-- 0 0/1 * * * ? 每分钟执行一次 --><!-- <property name="cronExpression" value="0 0 10 * * ?"></property> --> <!--每天的上午十点触发"0 45 11 * * ?" --> <property name="cronExpression" value="0 0/5 * * * ?"></property> <!--每五分钟执行一次 --></bean><!-- 总调度,用于启动定时器 --><bean id="schedulerFactory"class="org.springframework.scheduling.quartz.SchedulerFactoryBean"><property name="triggers"><list><ref bean="startWorkTrigger" /><!-- <ref bean="periodChartTaskTrigger" /> --></list></property></bean></beans>
阅读全文
0 0
- quartz 时间调度器 配置文件
- quartz任务调度配置文件
- spring任务调度器quartz 时间配置
- 调度器Quartz的配置文件中的线程池设置
- Quartz CronTrigger时间调度运用
- Quartz任务调度 时间设置
- 调度 Quartz 时间格式配置
- Quartz.NET 通过配置文件实现任务调度
- 定时任务 Quartz调度(采用配置文件)
- Quartz.NET 任务调度配置文件说明
- 定时任务 Quartz调度(采用配置文件)
- 使用Quartz调度器
- 使用Quartz调度器
- Quartz任务调度器
- Quartz调度器
- 任务调度器Quartz
- quartz 调度器配置
- Quartz 作业调度器
- 从四大云计算公司走向 看云行业趋势
- rsync通过服务同步、linux系统日志和screen工具
- centos7下配置golang1.9.2环境
- Android studio进阶之多语言/图片--国际化
- CSS background-size属性
- quartz 时间调度器 配置文件
- tensorflow的一些
- 内核模块加载顺序详解
- obj==null和obj.isEmpty()还有"".equals()有什么区别,equals
- Docker 换源
- 成功: MFC使用CEdit做一个显示日志的自动滚动窗口
- 数安时代免费SSL证书申请指南
- [Office] 设置段落标题边框
- spring Security4 和 oauth2整合 注解+xml混合使用(验证码等额外数据验证)