Java 删除石英中的触发器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1904064/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 23:42:08  来源:igfitidea点击:

delete trigger in quartz

javaquartz-scheduler

提问by user140736

Is there a way to delete a scheduled trigger with a specific job? It seems that only way to delete a trigger is to delete the whole job and then re-register the job and trigger.

有没有办法删除具有特定作业的预定触发器?似乎删除触发器的唯一方法是删除整个作业,然后重新注册作业和触发器。

I've a job which can potentially have 100+ triggers and I really don't want to delete the job and re-register all the triggers when I just have to delete 1 trigger.

我有一个可能有 100 多个触发器的工作,我真的不想删除该工作并在我只需要删除 1 个触发器时重新注册所有触发器。

Also, is there a way to stop the scheduler from executing the job as soon as the trigger is configured?

另外,有没有办法在配置触发器后立即停止调度程序执行作业?

Thanks

谢谢

采纳答案by pstanton

try scheduler.unscheduleJob

尝试 scheduler.unscheduleJob

this accepts the trigger and group names as a parameters and will only remove the trigger specified, not the job.

这接受触发器和组名称作为参数,并且只会删除指定的触发器,而不是作业。

QuartzScheduler

Quartz调度器

Scheduler

调度器

Forum

论坛