我正在使用带有simpleTrigger的骆驼石英组件,因为我现在需要在启动时触发,然后每12小时触发一次。我在下面的测试中有 5 分钟。 简单触发器语法
quartz://timerName?options
quartz://groupName/timerName?options
它的工作方式是有一个加载并实例化的单例数据库,当数据库加载并可用时,它会启动以下路由。 此路由应该启动,它确实在启动时执行作业一次,然后在每个间隔上执行,这是它失败的地方,它不会为间隔发出另一个触发器。
我看到的方式是 fireNow=true,在启动时触发路由
trigger.repeatInterval=300 establishes the period/interval between triggers
trigger.repeatCount=1 will allow 1 trigger to occur between repeatIntervals.
它启动,触发现在第一个触发器,但是,它不会触发另一个事件???
我做错了什么或误解了什么? 谢谢你的帮助。
fireNow=true&trigger.repeatInterval=300&trigger.repeatCount=1"
我的代码:
<route autoStartup="false" id="get.custkeys">
<from id="get.custkeys" uri="quartz://autoTokenService/getcustkey?fireNow=true&trigger.repeatInterval=300&trigger.repeatCount=1"/>
<process id="get.custkeys.rte" ref="tokenListLookupProcessor"/>
<split id="splitcustkey">
<tokenize token=","/>
<log id="sck1" loggingLevel="INFO" message="Custkey Requesting Token: ${body}"/>
<process id="supKey" ref="setUpKeysProcessor"/>
<throttle id="custkey_throttle" timePeriodMillis="1000">
<constant>1</constant>
<to id="getKeys" uri="seda:processCustKeys"/>
</throttle>
</split>
</route>
我想我找到了答案,trigger.repeatCount=-1将允许触发器事件再次发生。 此外,触发器.重复间隔以毫秒为单位。
下面,在启动时触发触发事件。 然后在 repeatInterval 之后,触发器事件再次触发。 不出所料。
<route autoStartup="false" id="get.custkeys">
<from id="get.custkeys" uri="quartz://autoTokenService/getcustkey?fireNow=true&trigger.repeatInterval=120000&trigger.repeatCount=-1&trigger.misfireInstruction=2"/>
<process id="get.custkeys.rte" ref="tokenListLookupProcessor"/>
<split id="splitcustkey">
<tokenize token=","/>
<log id="sck1" loggingLevel="INFO" message="Custkey Requesting Token: ${body}"/>
<process id="supKey" ref="setUpKeysProcessor"/>
<throttle id="custkey_throttle" timePeriodMillis="1000">
<constant>1</constant>
<to id="getKeys" uri="seda:processCustKeys"/>
</throttle>
</split>
</route>