永远不会执行的Cron作业 [英] A cron job that will never execute
本文介绍了永远不会执行的Cron作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以创建完全不运行作业的cron表达式吗?
Is there any way to create a cron expression for not running the job at all?
我虽然使用了这个表达式:
I though of using this expression :
0 0 0 1 1吗?3099
0 0 0 1 1 ? 3099
...这实际上可以完成工作,因为它将在3099年开始运行,但是有没有更清洁的方法呢?
...which will practically do the job as it will run on year 3099, but is there a cleaner way to do it?
推荐答案
如果即使在不久的将来仍在寻找强大的功能,请尝试 crontab条目中的2月31日,这些条目从不打算执行.
If you're still looking for something robust even in the far future, try https://stackoverflow.com/a/13938099/1601531, where I suggest the use of February 31st in crontab entries which are never intended to execute.
0 0 5 31 2 ?
这篇关于永远不会执行的Cron作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文