Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个 cronjobs,我想以十分钟的小间隔运行这两个 cronjobs。两天一次,在 0100 时和 0110 时
这就是我正在尝试的。
0 1 */2 * * job1.sh 10 1 */2 * * job2.sh
job1 没有按预期工作。它每天运行两次。job2 按预期运行(两天一次)。 我究竟做错了什么?
您需要添加执行脚本的二进制文件,以及文件的完整路径:
0 1 */2 * * /bin/sh /route/to/your/file/job1.sh 10 1 */2 * * /bin/sh /route/to/your/file/job2.sh
/bin/sh可以是另一回事,只需从which sh.
/bin/sh
which sh