简体   繁体   English

Spring Cron表达式完全不执行作业?

[英]Spring Cron expression to not execute job at all at any time?

I am working on job schedule in Spring app. 我正在春季应用程序中制定工作计划。 I want to stop job execution. 我想停止工作执行。 So, Can someone help me to provide CRON expresssion for the same. 因此,有人可以帮我提供相同的CRON表达。

I have tried few links in googling but as there is no year field(Which is available in other CRON like Unix etc) in the SPRING CRON expression, we can not give previous year to disable the same. 我在谷歌搜索中尝试了很少的链接,但是由于SPRING CRON表达式中没有年份字段(在其他CRON,例如Unix等中可用),因此我们不能给上一年禁用该字段。

I can comment OR remove bean code, that will disable it BUT my requirement is to achieve the same via spring CRON expression. 我可以注释或删除bean代码,但是将禁用它,但我的要求是通过spring CRON表达式实现相同的功能。

Thanks in Advance. 提前致谢。

quartz..cron=0/90 * * * * ? 石英..cron = 0/90 * * * *?

This webpage helped me for all my cron needs on my schedulers: Cron Maker 此网页帮助我满足了调度程序上的所有cron需求: Cron Maker

I don´t get how often you want your tasked to be performed but in anycase, hopefully the web page helps you. 我不知道您希望多久执行一次任务,但是无论如何,希望该网页能为您提供帮助。

'The special value "-" indicates a disabled cron trigger, primarily meant for externally specified values resolved by a ${...} placeholder', according to the javadoc. 根据Javadoc,“特殊值“-”表示已禁用的cron触发器,主要用于由$ {...}占位符解析的外部指定值”。 I am using the 'cron' property of @Scheduled , so I don't know if this applies to your implementation. 我正在使用@Scheduled的'cron'属性,所以我不知道这是否适用于您的实现。

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

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