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简介 ...
基于Hadoop平台的一种改进型FP-Growth算法.pdf
1、文件内容:sendmail-milter-8.14.7-6.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/sendmail-milter-8.14.7-6.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
昆仑通态MCGS与三菱E740变频器Modbus RTU通讯:实现输出、设定频率及加减速调整等功能,昆仑通态MCGS与三菱E740变频器通讯可直接拿来实用了,采用器件:三菱FR E740型号变频器,1块昆仑通态MCGS触摸屏 通讯方式:modbus RTU模式,走485方式。 功能:用MCGS读取变频器的输出频率,电流,电压,设定频率的写入,加减速时间的设置,点动频率的设置。 功能完善,扩展性强,程序可以直接拿来使用了。 昆仑通态MCGS是一种用于与三菱E740型号变频器进行通信的设备,通信方式采用modbus RTU模式,并通过485方式进行传输。它的主要功能是通过MCGS触摸屏读取变频器的输出频率、电流和电压,并实现设定频率的写入、加减速时间的设置以及点动频率的调整。这个设备功能齐全,扩展性强,可以直接应用于实际使用中。 知识点和领域范围: - 昆仑通态MCGS:这是一种用于人机界面(HMI)的设备,用于与工业控制设备进行通信和操作。 - 三菱E740型号变频器:这是一种电力电子设备,用于控制交流电机的转速和输出功率。 - modbus RTU:这是一种串行通信协议,常用于连接工
1738568556354963_92.mobileconfig
大充电功率;其他参数如上文所述。 "基于MATLAB Simulink的电动车制动能量回收控制策略设计与整车参数匹配",MATLAB Simulink搭建电动车制动能量回收控制策略 整车参数 整车参数及性能指标 基本参数 参数值 整备质量 kg 1550 满载质量 kg 1920 轴距 m 2.670 轮胎滚动半径 m 0.3 续驶里程 km 300 最高车速 (km·h-1) 150 最大爬坡度 % 30 0~100 km·h-1加速时间 s 12 电机、电池参数匹配 轮毂电机、动力电池参数 参数 参数值 轮毂电机 额定功率 kW 20 峰值功率 kW 50 额定转速 r·(min-1) 450 峰值转速 r·(min-1) 1500 额定转矩 (N·m) 400 峰值转矩 (N·m) 900 动力电池 额定电压 V 336 容量 Ah 170 最大充电功率 kW 7.5 电机最大制动力矩 式中,Temax为电机最大制动力矩;Pmax为电机峰值功率;PBmax为电池最大充电功率;ηb为电池充电效率;Tmax为电机峰值转矩;n为电机转速;nd为电机基速。
perl516-perl-ExtUtils-Manifest-1.63-2.el6.centos.alt.noarch.rpm
1e7b0-main.zip
2024年最新更新版俄罗斯方块h5源码,以前发过,作者又更新了代码。 源码无后门,就一条html文件,一个两个css文件以及一个js文件,上传服务器就可以玩。
三菱Q系列PLC QD77MS16走总线控制伺服项目全套解决方案:结构明晰,注释完整,含触摸屏程序与全套电气图纸,适用于新项目的直接应用。,三菱Q系列PLC ,QD77MS16走总线控制伺服项目,实际应用的 程序结构清晰明了,通俗易懂,8个伺服,PLC程序有完整的注释,有伺服设定参数,三菱触摸屏程序,电气BOM ,电气I O表,完整的电气图纸,EPLAN画的.适合你直接应用到新的项目。 ,三菱Q系列PLC; QD77MS16总线控制; 伺服项目应用; 程序结构清晰; 注释完整; 伺服设定参数; 三菱触摸屏程序; 电气BOM; 电气I/O表; 完整电气图纸; EPLAN绘制。,三菱Q系列PLC伺服控制项目:程序清晰、注释完整、电气资料齐全
1、文件内容:speech-dispatcher-0.7.1-15.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/speech-dispatcher-0.7.1-15.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
西威变频器主板底座图纸:原厂原设计avo avs avy avgl细节解析与工艺解读,西威变频器主板底座图纸avo avs avy avgl原厂原 ,核心关键词:西威变频器; 主板底座图纸; AVO; AVS; AVY; AVGL; 原厂原;,西威变频器主板底座图纸:原厂原版avo avs avy avgl详解
1、文件内容:slang-static-2.2.4-11.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/slang-static-2.2.4-11.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
1、文件内容:spax-1.5.2-13.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/spax-1.5.2-13.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
perl516-perl-DBD-MySQL-4.025-2.el6.centos.alt.x86_64.rpm
基于MATLAB的多目标粒子群算法在冷热电联供型综合能源系统优化运行中的应用参考学习版,多目标粒子群 冷热电联供 综合能源系统 运行优化 关键词:综合能源 冷热电三联供 粒子群算法 多目标优化 参考文档:《基于多目标算法的冷热电联供型综合能源系统运行优化》 仿真平台:MATLAB 平台采用粒子群实现求解 优势:代码注释详实,适合参考学习,非目前烂大街的版本,程序非常精品 主要内容:代码构建了含冷、热、电负荷的冷热电联供型综合能源系统优化调度模型,考虑了燃气轮机、电制冷机、锅炉以及风光机组等资源,并且考虑与上级电网的购电交易,综合考虑了用户购电购热冷量的成本、CCHP收益以及成本等各种因素,从而实现CCHP系统的经济运行,求解采用的是MOPSO算法(多目标粒子群算法),求解效果极佳 ,综合能源;冷热电三联供;粒子群算法;多目标优化;MOPSO算法;CCHP系统;经济运行;MATLAB平台;资源优化配置;购售电交易。,基于多目标粒子群算法的冷热电综合能源系统运行优化研究
perl516-perl-Clone-0.34-3.el6.centos.alt.x86_64.rpm
1、文件内容:tagsoup-javadoc-1.2.1-8.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/tagsoup-javadoc-1.2.1-8.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
飞思卡尔智能车双路驱动板DRV8701全套设计:PCB+原理图+物料清单,实测可用,可直接开板应用,Drv8701双路驱动pcb+原理图资料+物料清单(智能车驱动)飞思卡尔智能车DRV双电机驱动板pcb,可以直接开板,自己画的,实测可用 ,核心关键词:Drv8701双路驱动pcb;原理图资料;物料清单;智能车驱动;飞思卡尔智能车DRV双电机驱动板;开板。,"飞思卡尔DRV8701双路驱动PCB板设计与实测:原理图、物料清单全解析"
notepad ++ 8.7.6