java 如何禁用 Quartz JDBCJobStore 中的作业?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4430710/
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
How can I disable jobs in the Quartz JDBCJobStore?
提问by Ricardo Gladwell
What is the best way to disable a job in the JDBCJobStore without deleting it's job or trigger records and without wiping the cron expression?
在 JDBCJobStore 中禁用作业而不删除它的作业或触发记录并且不擦除 cron 表达式的最佳方法是什么?
回答by Ricardo Gladwell
Use scheduler.pauseJob()or scheduler.pauseTrigger().
使用scheduler.pauseJob()或scheduler.pauseTrigger()。
Alternatively you can use the following SQL script:
或者,您可以使用以下 SQL 脚本:
UPDATE QRTZ_TRIGGERS SET TRIGGER_STATE = "PAUSED"
回答by Tommi
Use the pauseJob
or pauseJobGroup
methods of JobStore
.
使用 的pauseJob
或pauseJobGroup
方法JobStore
。