简体   繁体   English

Quartz:动态作业调度

[英]Quartz : Dynamic job scheduling

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. 我正在动态调度石英作业,遇到的问题之一是,我找不到以编程方式将作业设置为“ PersistJobDataAfterExecution”和“ DisallowConcurrentExecution”的选项,因为两者都是注释。 Can any of you please suggest whats the equivalent while scheduling a job programmatically ( not declarative ) 你们中的任何人可以在以编程方式安排工作时(而非说明性的)提出建议吗?

Since you are scheduling dynamically you should be passing a JobDetail to the Scheduler. 由于您是动态调度的,因此您应该将JobDetail传递给调度程序。 You should be able to create your own JobDetail implementation or extends the base implementation then return whatever you want for the corresponding methods. 您应该能够创建自己的JobDetail实现或扩展基本实现,然后为相应的方法返回所需的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM