Quartz框架简单使用
来源:互联网 发布:手机淘宝没有删除评价 编辑:程序博客网 时间:2024/04/28 20:02
从此处学习到的配置方法:http://www.oschina.net/question/200745_62107
最重要的一个配置文件:
<?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:util="http://www.springframework.org/schema/util" xmlns:tx="http://www.springframework.org/schema/tx"xmlns:aop="http://www.springframework.org/schema/aop"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"><!-- Quartz config bean --> <bean id="examTipAndDeleteQuartz" class="com.onnet.utils.schedule.ExamTipAndDeleteQuartz"> <property name="mailService" ref="mailServiceImpl" /> <property name="examService" ref="examServiceImpl" /> <property name="systemTimeService" ref="systemTimeServiceImpl" /> </bean> <bean id="checkAccountQuartz" class="com.onnet.utils.schedule.CheckAccountQuartz"> <property name="orderService" ref="orderServiceImpl" /> </bean> <!-- bean触发方法配置 --> <bean id="methodInvokeBean" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="examTipAndDeleteQuartz" /> <property name="targetMethod" value="tipAndDelete" /> <property name="concurrent" value="false" /><!-- 并发,默认值是true,不存在并发一说 --> </bean> <bean id="methodInvokeBean2" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="checkAccountQuartz" /> <property name="targetMethod" value="checkAccountByTime" /> <property name="concurrent" value="false" /><!-- 并发,默认值是true,不存在并发一说 --> </bean> <!-- 配置执行时间表达式 --> <bean id="cronTriggerBean" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="methodInvokeBean"></property> <property name="cronExpression" value="0 0 1 * * ?" /><!-- 每天凌晨2点 --> </bean> <bean id="cronTriggerBean2" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="methodInvokeBean2"></property> <property name="cronExpression" value="0 0 3 * * ?" /><!-- 每天凌晨3点 --> </bean> <!-- 配置调度器 --> <bean id="scheduledFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="cronTriggerBean" /> <ref bean="cronTriggerBean2" /> </list> </property> </bean></beans>
- Quartz框架简单使用
- quartz框架简单使用
- quartz任务调度框架的简单使用
- Quartz 的简单使用(不使用任何框架)
- Quartz调度框架简单介绍
- quartz简单使用小结
- Quartz的简单使用
- Quartz简单使用
- Quartz的简单使用
- quartz 简单使用
- 定时框架quartz的使用
- Quartz 2D 简单使用
- Quartz(一) 简单的使用
- java定时框架Quartz的简单应用
- 任务调度框架Quartz简单入门
- Quartz.Net的使用(简单配置方法)定时任务框架
- Quartz.Net的使用(简单配置方法)定时任务框架
- Quartz.Net的使用(简单配置方法)定时任务框架
- 关于ASP.net运行流程
- Android UI开发第四篇——实现像handcent sms或者chomp sms那样的气泡短信样式
- Membase,Memcached,Couchbase1.8 JAVA 简单调用 操作
- DCMTK3.6.0入门指南
- Iterator模式
- Quartz框架简单使用
- 为什么需要内部类?
- elasticsearch和hadoop集成,gateway.type hdfs设置
- [Effective WX] 理解wxWindow与wxSizer的关系
- 待读书:《沸腾十五年》
- poj 2485 3921 最大流 拆点构图
- C#中String类方法汇总
- C#累加校验,校验和
- 单元测试准则