`
bruce008
  • 浏览: 170486 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Quarz 常用范式

 
阅读更多

Quaz  is a very common library for us to use to scheudle  regular jobs.  

Just record the paradism to use the Quarz 

1,  SchedulerFactory to initialize a scheduler to use, there might be several kinds of schedulers to use

     base on the property configuration, for example the thread pool size, the thread pool name

 

2, Once the scheduler is created, we can start the scheduler. Only the scheudler is started, we can use it. 

 

3, We can created a JobDetail with the Job class type to schedule a new Job with the crontrigger, which is used to specify the executing freqency of the Job.

       JobDetail  jobDetail = new JobDetail( jobName, jobGroupName, jobClassType);

                 JobDataMap is key/value map to specify the context, or the real parameter of the Job 

 

4,  We define the Job class type in the step 3.  It's better to define a StatefulJob for the Job , the execute method will be called back when a new Job triggered by the scheduler

      use the JobDataMap() to get the paramter to do the things.

 

5,  If we want to manage the scheduler life cycle , we can call its scheduler.stop 

 

There are quite a few defects we have faced in different version of quarz,  so we are using its stable version

1.6.5 .

 

  

 

 

 

分享到:
评论

相关推荐

    Quartz定时任务常用的11张数据库脚本表结构

    Quartz定时任务常用的11张数据库脚本表结构,网上大部分都是只是说说,没有实际帮助,有的大部分积分还很贵,本人总结一下,希望能给有需要的人一些帮助。

    quartz指南,Quartz 工程

    文件里面包括 1:Quartz开发指南.pdf 2:Quartz从入门到进阶.pdf 3:QuartzBeginnerExample一个附带的工程例子 4:quartz-1.6.1.zip Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,它...

    quartz quartz-1.8.6 dbTables 建表sql

    quartz quartz-1.8.6 dbTables quartz动态任务调度需要的数据库脚本。

    quartz-test.zip 常用封装 quartz-helper工具类

    quartz-test.zip 常用封装 quartz-helper工具类 创建job,删除job 包括于spring的结合,还有实用数据库保存job,提供的数据库脚本

    quartz-2.3.2-API文档-中文版.zip

    赠送jar包:quartz-2.3.2.jar; 赠送原API文档:quartz-2.3.2-javadoc.jar; 赠送源代码:quartz-2.3.2-sources.jar; 赠送Maven依赖信息文件:quartz-2.3.2.pom; 包含翻译后的API文档:quartz-2.3.2-javadoc-API...

    quartz简单实例quartz简单实例

    quartz简单实例quartz简单实例quartz简单实例quartz简单实例

    quartz-1.6.0.jar和quartz-all-1.6.0.jar

    该压缩包内包含两个quartz的jar包, 分别是quartz-1.6.0.jar和quartz-all-1.6.0.jar

    quartz-2.2.3版本的quartz初始化sql语句

    quartz-2.2.3版本的quartz初始化sql语句

    quartz-2.3.0-API文档-中文版.zip

    赠送jar包:quartz-2.3.0.jar; 赠送原API文档:quartz-2.3.0-javadoc.jar; 赠送源代码:quartz-2.3.0-sources.jar; 赠送Maven依赖信息文件:quartz-2.3.0.pom; 包含翻译后的API文档:quartz-2.3.0-javadoc-API...

    lucene与quartz例子

    lucene quartz 例子lucene quartz 例子lucene quartz 例子lucene quartz 例子lucene quartz 例子lucene quartz 例子lucene quartz 例子lucene quartz 例子lucene quartz 例子lucene quartz 例子

    QuartzAPI中文chm

    QuartzAPI中文chm文档,快速学习Quartz的常用工具

    quartz1.5,quartz1.6,quartz1.8

    Quartz1.5,Quartz1.6,Quartz1.8。Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,它可以与J2EE与J2SE应用程序相结合也可以单独使用。Quartz可以用来创建简单或为运行十个,百个,甚至是好几万个...

    Quartz.NET-2.0

    Quartz.NET框架的核心是调度器。调度器负责管理Quartz.NET应用运行时环境。Quartz不仅仅是线程和线程管理。为确保可伸缩性,Quartz.NET采用了基于多线程的架构。启动时,框架初始化一套worker线程,这套线程被调度器...

    quartz内部表.sql

    quartz内部表.sql。

    Quartz原理及实例

    Quartz原理及实例,spring4.x+Quartz.2.2.1结合的开发,静态和动态实例

    Quartz介绍.docx

    Quartz使用方法Quartz使用方法Quartz使用方法Quartz使用方法Quartz使用方法

    Autofac.Extras.Quartz, Quartz.Net的Autofac集成.zip

    Autofac.Extras.Quartz, Quartz.Net的Autofac集成 Autofac.Extras.Quartz用于 Quartz.Net的Autofac集成包。Autofac.Extras.Quartz 为每个石英作业创建嵌套的litefime作用域。 完成作业执行后释放嵌套作用域。这允许...

    自开发实现Quartz Web管理工具

    网上能找到的Quartz Web管理的资料都是使用的一个国外人写的Quartz WebApp的东东,功能也很全面。但是作为自己的应用其实用不了那么多功能,一般我们只要可以定义一个job,指定一个Cron表达式完成工作即可,附带的...

    Quartz-2.0.2 CSDN下载

    Quartz框架的核心是调度器。调度器负责管理Quartz应用运行时环境。调度器不是靠自己做所有的工作,而是依赖框架内一些非常重要的部件。 Quartz不仅仅是线程和线程管理。为确保可伸缩性,Quartz采用了基于多线程的...

    quartz 时间配置规则

    quartz 时间配置规则quartz 时间配置规则quartz 时间配置规则quartz 时间配置规则quartz 时间配置规则quartz 时间配置规则

Global site tag (gtag.js) - Google Analytics