删除quartz中的触发器
有没有办法删除特定作业的预定触发器?似乎删除触发器的唯一方法是删除整个作业,然后重新注册作业和触发器。
我的工作可能有 100 多个触发器,当我只需要删除 1 个触发器时,我真的不想删除该工作并重新注册所有触发器。
另外,有没有办法在配置触发器后立即停止调度程序执行作业?
谢谢
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.
Also, is there a way to stop the scheduler from executing the job as soon as the trigger is configured?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试scheduler.unscheduleJob,
它接受触发器和组名称作为参数,并且只会删除指定的触发器,而不是作业。
QuartzScheduler
调度程序
论坛
try
scheduler.unscheduleJob
this accepts the trigger and group names as a parameters and will only remove the trigger specified, not the job.
QuartzScheduler
Scheduler
Forum