The JobDetail object is created by the Quartz client (your program) at the time the Job is added to the scheduler. It
contains various property settings for the Job, as well as a JobDataMap, which can be used to store state information
for a given instance of your job class.
Trigger objects are used to trigger the execution (or 'firing') of jobs.Triggers may also have a JobDataMap associated
with them - this is useful to passing parameters to a Job that are specific to the firings of the trigger.
CronTrigger is useful if you wish to have triggering based on calendar-like schedules.
Jobs and Triggers are given identifying names as they are registered with the Quartz scheduler. The name of a job or
trigger must be unique within its group. If you leave the group of the Job or Trigger 'null', it is equivalent to having
specified Scheduler.DEFAULT_GROUP.
The JobDataMap can be used to hold any number of (serializable) objects.
The JobDataMap that is found on the JobExecutionContext during Job execution serves as a convenience. It is a merge of
the JobDataMap found on the JobDetail and the one found on the Trigger, with the value in the latter overriding any
same-named values in the former.
A Job instance can be defined as "stateful" or "non-stateful". If a job is stateful, and a trigger attempts to 'fire'
the job while it is already executing, the trigger will block (wait) until the previous execution completes.
You 'mark' a Job as stateful by having it implement the StatefulJob interface, rather than the Job interface.
You may want to create your own implementation of JobFactory to accomplish things such as having your application's IoC
or DI container produce/initialize the job instance.
The only type of exception (including RuntimeExceptions) that you are allowed to throw from the execute method is the
JobExecutionException. Because of this, you should generally wrap the entire contents of the execute method with a 'try
-catch' block, your job can use it to provide the scheduler various directives as to how you want the exception to be
handled.
Quartz Calendars are useful for excluding blocks of time from the the trigger's firing schedule.
Sometimes, when you have many Triggers (or few worker threads in your Quartz thread pool), Quartz may not have enough
resources to immediately fire all of the Triggers that are scheduled to fire at the same time.
A misfire occurs if a persistent trigger "misses" its firing time because of the scheduler being shutdown, or because
there are no available threads in Quartz's thread pool for executing the job. The misfire instruction for a given
trigger instance can be configured using the setMisfireInstruction(..) method.
The TriggerUtils class (in the org.quartz package) contains conveniences to help you create triggers and dates without
having to monkey around with java.util.Calendar objects.
Objects implementing the TriggerListener interface will receive notifications as a trigger is fired.
Cron-Expressions are used to configure instances of CronTrigger. Cron-Expressions are strings that are actually made up
of seven sub-expressions, that describe individual details of the schedule. These sub-expression are separated with
white-space, and represent:
Seconds
Minutes
Hours
Day-of-Month
Month
Day-of-Week
Year (optional field)
Individual sub-expressions can contain ranges and/or lists. For example, the day of week field in the previous (which
reads "WED") example could be replaces with "MON-FRI", "MON, WED, FRI", or even "MON-WED,SAT".
Wild-cards (the '*' character) can be used to say "every" possible value of this field. Therefore the '*' character in
the "Month" field of the previous example simply means "every month". A '*' in the Day-Of-Week field would obviously
mean "every day of the week".
All of the fields have a set of valid values that can be specified. These values should be fairly obvious - such as the
numbers 0 to 59 for seconds and minutes, and the values 0 to 23 for hours. Day-of-Month can be any value 0-31, but you
need to be careful about how many days are in a given month! Months can be specified as values between 0 and 11, or by
using the strings JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV and DEC. Days-of-Week can be specified as vaules
between 1 and 7 (1 = Sunday) or by using the strings SUN, MON, TUE, WED, THU, FRI and SAT.
The '/' character can be used to specify increments to values. For example, if you put '0/15' in the Minutes field, it
means 'every 15 minutes, starting at minute zero'. If you used '3/20' in the Minutes field, it would mean 'every 20
minutes during the hour, starting at minute three' - or in other words it is the same as specifying '3,23,43' in the
Minutes field.
The '?' character is allowed for the day-of-month and day-of-week fields. It is used to specify "no specific value".
This is useful when you need to specify something in one of the two fields, but not the other. See the examples below
(and CronTrigger JavaDoc) for clarification.
The 'L' character is allowed for the day-of-month and day-of-week fields. This character is short-hand for "last", but
it has different meaning in each of the two fields. For example, the value "L" in the day-of-month field means "the last
day of the month" - day 31 for January, day 28 for February on non-leap years. If used in the day-of-week field by
itself, it simply means "7" or "SAT". But if used in the day-of-week field after another value, it means "the last xxx
day of the month" - for example "6L" or "FRIL" both mean "the last friday of the month". When using the 'L' option, it
is important not to specify lists, or ranges of values, as you'll get confusing results.
The 'W' is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify
"15W" as the value for the day-of-month field, the meaning is: "the nearest weekday to the 15th of the month".
The '#' is used to specify "the nth" XXX weekday of the month. For example, the value of "6#3" or "FRI#3" in the day-of
-week field means "the third Friday of the month".
JobStore's are responsible for keeping track of all the "work data" that you give to the scheduler. Never use a JobStore
instance directly in your code.
RAMJobStore and JDBCJobStore.
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.dataSource = myDS
分享到:
相关推荐
Quartz是一款开源的作业调度框架,它允许开发者在Java应用程序中定义和执行复杂的定时任务。这个教程、学习手册和帮助手册旨在帮助用户深入理解和有效利用Quartz进行任务调度。 一、Quartz简介 ...
【资源说明】 基于微信小程序的校园论坛;微信小程序;云开发;云数据库;云储存;云函数;纯JS无后台;全部资料+详细文档+高分项目.zip 【备注】 1、该项目是个人高分项目源码,已获导师指导认可通过,答辩评审分达到95分 2、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 3、本项目适合计算机相关专业(人工智能、通信工程、自动化、电子信息、物联网等)的在校学生、老师或者企业员工下载使用,也可作为毕业设计、课程设计、作业、项目初期立项演示等,当然也适合小白学习进阶。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 欢迎下载,沟通交流,互相学习,共同进步!
单电阻采样 基于单电阻采样的相电流重构算法 keil完整工程。 单电阻采样 f103的单电阻,完整工程,带文档,带硬件资料。 f3平台的单电阻完整工程,代码详细注释。 还有微芯的单电阻smo代码加文档 具体如截图请看下
jQuery左侧导航右侧tab页面切换
哈希查找
五相电机邻近四矢量SVPWM模型_MATLAB_Simulink仿真模型包括: (1)原理说明文档(重要):包括扇区判断、矢量作用时间计算、矢量作用顺序及切时间计算、PWM波的生成; (2)输出部分仿真波形及仿真说明文档; (3)完整版仿真模型:Simulink仿真模型; 注意,只包含五相电机邻近四矢量SVPWM算法,并非五相电机双闭环矢量控制,如果想要五相电机双闭环矢量控制资料,另一个链接。 资料介绍过程十分详细
法码滋.exe法码滋2.exe法码滋3.exe
项目包含完整前后端源码和数据库文件,均测试可正常运行 环境说明: 开发语言:Java 框架:ssm,mybatis JDK版本:JDK1.8 数据库:mysql 5.7 数据库工具:Navicat11 开发软件:eclipse/idea Maven包:Maven3.3 部署容器:tomcat7
算法允许用户在图像上自行划定标签,并对这些区域内的图像进行肤色检测和处理;最后在一个PyQt窗口中显示处理后的三张图片,分别为带标签图片,二值化图片,膨胀后图片。
内容概要: 本资料包含了一系列用于庆祝浪漫节日的创意代码,主要包括爱心代码和圣诞树代码。这些代码可以生成视觉上吸引人的图案和动画,用于在屏幕上展示爱心和圣诞树,增加节日气氛。爱心代码可以用于表达爱意,而圣诞树代码则适合在圣诞节期间使用,为用户带来节日的欢乐和视觉享受。 适用人群: 本资料适用于以下人群: 程序员和开发者,他们希望在项目中添加节日元素或为特别场合创造个性化的视觉效果。 网页设计师,他们需要为网站或应用程序添加节日主题的装饰。 技术爱好者和DIY爱好者,他们喜欢通过编程来庆祝节日或为朋友和家人制作特别的礼物。 实现:可直接运行python程序。
1. 患者信息与隔离状态管理 患者基本信息录入:对于疑似、确诊或密切接触者患者,系统记录其基本信息,包括姓名、年龄、性别、联系方式、住址等。 疫情风险评估:通过问卷或医务人员评估,系统对患者进行风险评估,判断是否需要隔离、隔离的级别(如轻症、中症、重症等)。 隔离状态管理:记录患者的隔离状态(如隔离中、已解除隔离、转入ICU等),并能够实时更新隔离状态变化。 隔离病房分配:根据患者的病情、感染风险和病房资源,系统自动分配适当的隔离病房或床位,避免交叉感染。 2. 隔离病房与环境管理 病房信息管理:系统对每个隔离病房进行实时监控,包括病房的床位使用情况、设备设施、清洁消毒状况等,确保每个病房的隔离效果。 空气流通与环境消毒管理:记录隔离病房的空气流通情况、消毒记录、物品消耗等,确保符合疫情防控要求。 设备与物资分配:针对隔离病房的特殊需求,系统可以自动化管理医疗设备(如氧气、呼吸机等)与防护物资(如口罩、手套、防护服等)的分配与库存管理。 3. 医护人员防护与工作管理 医护人员排班与防护管理:为隔离病房的医护人员进行特殊排班,避免交叉感染,并根据需要分配适当的防护装备,如全身防护服、N9
适配文章:https://editor.csdn.net/md?not_checkout=1&spm=1011.2415.3001.6217&articleId=144663667 富芮坤FR8003作为主机连接FR8003二:官方代码主从的UUID和att_idx
内容概要:文章介绍了USB PD协议单口控制器DP3145D的技术特点、主要功能和应用场景。DP3145D支持USB Type-C和USB Power Delivery(PD)3.1协议,具备多种配置选项,最高输出功率45W。它集成了CV环路光耦驱动电路、反馈网络电阻以及多项保护措施,适用于ACDC适配器等USB充电设备。 适合人群:电子工程师、电源产品设计师和技术研究人员。 使用场景及目标:主要用于设计和开发支持USB PD协议的ACDC适配器和充电设备,实现高效、安全的充电解决方案。 阅读建议:重点关注DP3145D的具体技术参数、功能特点和典型应用实例,结合自身需求进行产品选型和设计。
VBA视频教程 05
基于Spring Boot框架的网上蛋糕销售系统_30z8r428_231-wx.zip
matlab
蜡笔小新-去掉动效.zip
1221额的2的2的2额
济宁市2005-2024年近20年的历史气象数据,每3小时更新一次数据,参数包含气温、气压、降水量、云层、能见度、风向、湿度等,几万条数据
8.40 最新版本Saturn_PCB_Toolkit安装包,,eda 设计 PCB设计辅助工具,软件功能强大,单端线阻抗、差分线阻抗到串扰分析等多种计算工具