Quartz 重新安排问题
我对 Quartz 作业重新安排有疑问。问题如下,
- 我有 2 个基于 Cron 表达式的调度程序作业。
- 第一个作业(作业 A )将根据数据库表中提供的 cron 表达式配置第二个作业(作业 B)和作业 A 本身。
- 作业 A 配置为在每小时的第 0 分钟运行,作业 B 计划在每小时的第 15 分钟运行。
- 在这两个作业第一次运行后,我将作业 B 的 cron 表达式更改为“每小时的每 45 分钟运行一次”。
- 在下一小时的第 0 分钟,作业 A 戏剧性地重新配置作业 B(使用 Scheduler.重新安排作业())。此时预期的行为是 作业 B 应在下一小时的第 45 分钟运行。但是作业 b 与作业 A 一起运行,并在该小时的第 0 分钟及 正如预期的那样,第 45 分钟。后来它只按预期在第 45 分钟运行。
附加信息: 使用的石英版本:1.6.5 该调度程序部署在Jboss 4.3应用服务器上,集群环境下有两个节点 使用的数据库:Oracle 10g
有人可以帮我解决这个问题吗?
I have an issue with Quartz job rescheduling. The issue is as below,
- I have 2 Scheduler jobs which are based on Cron expressions.
- The first job (Job A )will configure the second job (Job B)and Job A itself based on cron expressions provided in data base table.
- The Job A is configured to run at every 0th minute of hour and Job B is scheduled to run at 15th minute of every hour.
- After both the jobs ran for first time , I am changing the cron expression for the Job B to 'run it on every 45th minute of every hour'
- On the 0th minute of next hour, Job A is reconfiguring Job B melodramatically (Using Scheduler.rescheduleJob()). At this point expected behavior is
the Job B should run on next 45th minute of the coming hour. But the Job b is running along with the Job A running on 0th miute of the hour and on
45th minute as expected. Later on it is running on 45th minute only as expected.
Additional information:
Quartz version used : 1.6.5
This scheduling program is deployed in Jboss 4.3 application server with two nodes in clustered environment
Database used : Oracle 10g
Could somebody help me to resolve this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试删除现有触发器并在更新时添加新触发器,而不是重新安排。
Try deleting the existing trigger and adding it a-new on update, instead of rescheduling .