【问题标题】:running one job with multiple trigger使用多个触发器运行一项作业
【发布时间】:2012-05-05 07:06:31
【问题描述】:

我有 (N) 个触发器,但一次有一个正在运行的作业。 我想控制失火的触发器,并在作业完成后运行最近的失火触发器。 Quartz.net 有什么可用的解决方案吗?

编辑:我希望所有触发器都有一个类似字典的结构,如果其中一个触发器失败更新该触发器的最后一次失败时间,那么在完成运行作业后决定应该运行哪个触发器通过了不到 40% 的失火时间。 (触发检查基于优先级)

【问题讨论】:

  • 你能给我们更多的信息吗?

标签: c# .net quartz.net


【解决方案1】:

我不完全理解您的问题,但我想您的解决方案是创建一个由听众处理的结构。 http://quartznet.sourceforge.net/tutorial/lesson_7.html

在示例中(IJobListener)

public void JobToBeExecuted(JobExecutionContext context) {
    ...deal with triggers, and determine the last one;
}

public void JobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {
    ...now with the job complete you can fire another behavior.
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-13
    • 1970-01-01
    • 2010-09-20
    • 1970-01-01
    • 1970-01-01
    • 2013-08-09
    • 1970-01-01
    相关资源
    最近更新 更多