- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经通过 stackoverflow 和许多其他网站回答了很多问题,但仍然没有找到解决我的问题的运气。
我们在上午 9:30 到 10 点之间安排了大约 35 个作业,但有时有 3 到 5 个作业未执行,并且在运行丢失的作业后,因为 Adhoc 运行系统从第二天开始再次正常工作。几天或几周后,这种情况会再次发生。
我们使用的是 quartz 版本 2.2.3 和 spring batch 版本 4.2.0.RELEASE。
我们没有覆盖调度程序线程数,因为它在很长一段时间内一直完美运行,突然开始间歇性地失败。
以下是 quartz 的属性,
<property name="quartzProperties">
<props>
<prop key="org.quartz.scheduler.skipUpdateCheck">true</prop>
<prop key="org.quartz.jobStore.class">org.quartz.impl.jdbcjobstore.JobStoreTX</prop>
<prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.StdJDBCDelegate</prop>
<prop key="org.quartz.scheduler.instanceId">AUTO</prop>
<prop key="org.quartz.jobStore.useProperties">false</prop>
<prop key="org.quartz.jobStore.tablePrefix">#{'${db.defaultschema}' != '' ? '${db.defaultschema}'+'.QRTZ_' : 'QRTZ_'}</prop>
<prop key="org.quartz.jobStore.selectWithLockSQL">SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?</prop>
<prop key="org.quartz.jobStore.isClustered">true</prop>
<prop key="org.quartz.jobStore.dataSource">dataSource</prop>
<prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
</prop>
</props>
</property>
Spring 批处理作业配置:
<batch:job id="reportJob">
<batch:step id="step1">
<batch:tasklet>
<batch:chunk reader="reports-reader" processor="reports-processor"
writer="reports-writer" commit-interval="0">
</batch:chunk>
</batch:tasklet>
</batch:step>
<batch:listeners>
<batch:listener ref="batchJobListener" />
</batch:listeners>
</batch:job>
<bean id="reports-reader" scope="step"
class="com.company.reportloader.reader.ReportsItemReader">
<property name="reportsItemReaderService" ref="reportsItemReaderService"></property>
</bean>
<bean id="reports-processor" class="com.company.reportloader.processor.ReportsItemProcessor"></bean>
<bean id="reports-writer" class="com.company.reportloader.writer.ReportsItemWriter">
</bean>
覆盖 QuartzJobBean 的 executeInternal 并创建 jobParameters 以调用 spring 批处理作业,如下所示,
@Override
protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
launcher.run(job, jobParameters);
}
任何帮助或指示都会有很大帮助。
最佳答案
我们在作业编辑功能中将 misfire 指令更新为 2 时遇到了代码问题。我们通过将 qrtz_triggers 表中的 misfire_instr 设置为 0 解决了这个问题。不知何故,调度程序认为很少有作业被误触发,作业没有在预定时间触发。对于 cron-trigger 下面是 misfire 指令的定义,
**smart policy - default** See: withMisfireHandlingInstructionFireAndProceed
**withMisfireHandlingInstructionIgnoreMisfires**
MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICYQTZ-283 All misfired executions are
immediately executed, then the trigger runs back on schedule.
Example scenario: the executions scheduled at 9 and 10 AM are executed immediately.
The next scheduled execution (at 11 AM) runs on time.
**withMisfireHandlingInstructionFireAndProceed**
MISFIRE_INSTRUCTION_FIRE_ONCE_NOW Immediately executes first misfired execution and
discards other (i.e. all misfired executions are merged together). Then back to
schedule. No matter how many trigger executions were missed, only single immediate
execution is performed.
Example scenario: the executions scheduled at 9 and 10 AM are merged and executed only
once (in other words: the execution scheduled at 10 AM is discarded). The next
scheduled execution (at 11 AM) runs on time.
**withMisfireHandlingInstructionDoNothing**
MISFIRE_INSTRUCTION_DO_NOTHING All misfired executions are discarded, the scheduler
simply waits for next scheduled time.
Example scenario: the executions scheduled at 9 and 10 AM are discarded, so basically
nothing happens. The next scheduled execution (at 11 AM) runs on time.
将 misfire_instr 更新为 0 后,由于智能策略(默认),一旦负载降低,quartz 会在 3-5 分钟内启动 mis-fired 作业。
关于java - 在生产环境中间歇性地在预定时间触发 Quartz 作业触发器未命中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65438256/
概述 触发器是 MySQL 的数据库对象之一,不需要程序调用或手工启动,而是由事件来触发、激活,从而实现执行,包括 INSERT 语句、UPDATE 语句和 DELETE 语句 创建触发器 1. 创建
当我为单元格获得的值是某种类型时,我试图设置一个触发器来显示文本块。 我已经成功地设法在相同的情况下显示图像,但在这种情况下我不需要图像,而是一些文本。 已注释掉行以进行测试。尝试使其工作。注释掉的代
我需要在 phpmyadmin 中为 2 个表创建一个触发器。 所以有表 stores 和 tbl_storefinder_stores。 我想从 stores 表中插入 4 个东西(名称、地址、经度
阅读目录 1、触发器 2、触发器类型 3、触发器语法 4、插入数据触发器案例 5、修改数据触发器案例
SQLite 触发器(Trigger) SQLite 的触发器是数据库的回调函数,它会在指定的数据库事件发生时自动执行/调用。以下是关于SQLite的触发器的要点:SQLite **触发器(Trig
请帮我写一个向表中添加新行的触发器。 我的数据库中有 3 个表: 地区(id,名字); id - 主要; 技术人员(身份证、姓名); id - 主要; 可用性(id、区域、技术、计数); id - p
我正在编写一个触发器来审核表中的更新和删除。我正在使用 SQL Server 2008 我的问题是, 有没有办法在不经过删除和插入表的选择阶段的情况下找出对记录采取的操作? 另一个问题是,如果记录被删
我的表: TableA (id number, state number) TableB (id number, tableAId number, state number) TableC (id n
我很少写触发器。我可以帮助设置这件事。 CREATE TRIGGER audit_tableName ON dbo.tableNameAudit AFTER CREATE, UPDATE, DELET
我之前从未在 Oracle 中创建过触发器,所以我正在寻找一些方向。 如果 ID 不在插入语句中,我想创建一个将 ID 增加 1 的触发器。 ID 应该从 10000 开始,当插入一条记录时,下一个
考虑以下两个(假设的)表 温度 * day * time * lake_name * station * temperature_f 温度_总结 * day * lake_name * station
如何在 SQL 触发器中获取更新记录的值 - 如下所示: CREATE TRIGGER TR_UpdateNew ON Users AFTER UPDATE AS BEGIN S
我是 Cassandra 新手,使用 Cassandra 3.10 并有类似的表格 create table db1.table1 (id text, trip_id text, event_time
在 MSSQL 中执行 TRUNCATE(而不是删除)时如何触发触发器 最佳答案 来自msdn : TRUNCATE TABLE cannot activate a trigger because t
我正在尝试在 sql developer 中创建一个简单的触发器,以在工资发生变化时显示工资的变化 CREATE OR REPLACE TRIGGER salary_changes BEFORE DE
我有三个表: Table1: Customers (CustomerId, Name, CustomerAddress) Table2: AccountManagers(ManagerId, Name
在 Sql Server 2005 触发器中有没有办法在执行期间获取触发器附加到的表的名称和架构? 最佳答案 SELECT OBJECT_NAME(parent_id) AS [Table],
使用 MySQL 5.5,以下触发器因错误而被拒绝: create trigger nodups before insert on `category-category` for each row b
我使用 fancybox 打开一个带有表单的弹出窗口。目前,当鼠标离开主页时,弹出窗口就会出现。为了完成这项工作,我有一个隐藏的链接标签,我用trigger()函数模拟它,单击该函数,以便该链接的hr
我的触发器触发 INSERT, UPDATE and DELETE .我需要根据触发触发器的操作从适当的内存表( inserted, deleted )插入。由于只有 inserted位于 INSER
我是一名优秀的程序员,十分优秀!