quartz xml调度数据文件可以只包含触发器吗?
我是否必须为 xml 文件中的每个触发器定义作业,或者我的 xml 文件只能有触发器吗?
Do I have to define jobs for each trigger in the xml file, or can my xml file only have triggers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,如果触发器相关的作业已经在调度程序中,那么它将按预期进行处理,不会出现错误。如果触发器引用的作业在调度程序中不存在,则在处理文件时您将收到异常。
对于已经在调度程序中的作业,作业必须已经有触发器(在调度程序中)或者必须将其“持久”标志设置为“true” - 这使它们存在于触发器的生命周期之外。
Yes, if the jobs the triggers relate to are already in the scheduler, then it will process as expected, without errors. If the jobs referred to by the triggers don't exist in the scheduler you will get an exception when the file is processed.
For the jobs to already be in the scheduler the jobs must either already have triggers (in the scheduler) or must have their "durable" flag set to "true" - which lets them exist outside of the lifespan of their triggers.