Quartz:动态作业调度
我正在动态调度石英作业,遇到的问题之一是,我找不到以编程方式将作业设置为“PersistJobDataAfterExecution”和“DisallowConcurrentExecution”的选项,因为两者都是注释。你们中的任何人都可以建议以编程方式安排作业时等效的内容(非声明性)
I'm scheduling quartz job dynamically and one of the issue that I came across is, I couldnt find an option to programmatically set the job to "PersistJobDataAfterExecution" and "DisallowConcurrentExecution" as both are annotation. Can any of you please suggest whats the equivalent while scheduling a job programmatically ( not declarative )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您正在动态调度,因此您应该将 JobDetail 传递给调度程序。您应该能够创建自己的 JobDetail 实现或扩展基本实现,然后返回相应方法所需的任何内容。
Since you are scheduling dynamically you should be passing a JobDetail to the Scheduler. You should be able to create your own JobDetail implementation or extends the base implementation then return whatever you want for the corresponding methods.