博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
定时任务 - quartz
阅读量:4703 次
发布时间:2019-06-10

本文共 1571 字,大约阅读时间需要 5 分钟。

1)maven 依赖

org.quartz-scheduler
quartz
2.2.1
org.springframework
spring-context-support
4.1.5.RELEASE

 

2)spring 配置

org.quartz.simpl.SimpleThreadPool
10
5
true
    
0 0 23 * * ?

 

3)jobClass

package info.shagri.vpst.web.quartz;import info.shagri.vpst.service.jcsj.CompanyService;import org.quartz.JobExecutionContext;import org.springframework.scheduling.quartz.QuartzJobBean;import com.framework.web.utils.ApplicationContextHolder;/** * 统计所有有效公司各项面积 *  */public class StatisComAreasTask extends QuartzJobBean {        protected void executeInternal(JobExecutionContext jobExecutionContext) {        CompanyService service = ApplicationContextHolder.getBean("companyService");        service.doStatisThenStoreCompanyAreas();    }    }

 

转载于:https://www.cnblogs.com/zhiqsyr/p/5148693.html

你可能感兴趣的文章
MySQL批量SQL插入性能优化
查看>>
定义列属性:null,default,PK,auto_increment
查看>>
用户画像展示
查看>>
C#中StreamReader读取中文出现乱码
查看>>
使用BufferedReader的时候出现的问题
查看>>
批处理文件中的路径问题
查看>>
hibernate出现No row with the given identifier exists问题
查看>>
为什么wait()和notify()属于Object类
查看>>
配置NRPE的通讯
查看>>
匹配两个空格之间的字符。。。
查看>>
CSS 文字溢出 变成省略号 ...
查看>>
Spring事务
查看>>
java编程基础(三)流程控制语句
查看>>
让数据库跑的更快的7个MySQL优化建议
查看>>
jquery 取id模糊查询
查看>>
解决在vue中,自用mask模态框出来后,下层的元素依旧可以滑动的问题
查看>>
PAT(B) 1014 福尔摩斯的约会(Java)
查看>>
PAT甲级题解-1123. Is It a Complete AVL Tree (30)-AVL树+满二叉树
查看>>
项目开发总结报告(GB8567——88)
查看>>
SSH加固
查看>>