简体   繁体   English

每4小时15分钟设置一次crontab

[英]Set up crontab every 4 hours 15 minutes

Below, I have this cron expression that runs every 4 hours: 下面,我有一个每4小时运行一次的cron表达式:

* */4 * * *

However, I need it to run every 4 hours 15 minutes. 但是,我需要它每4小时15分钟运行一次。

Your help is appreciated. 感谢您的帮助。

我在使用此Cron时遇到问题,我不知道该表达式是否不正确,它将每4小时运行一次,但不会停止,它在开始运行的每一分钟都会运行

* */4 * * *

I'm sure it's impossible to implement it with just a single rule. 我敢肯定,仅凭一条规则就不可能实现它。

But you still can achieve the same using multiple rules: 但是您仍然可以使用多个规则来实现相同目的:

0  0  * * * ...
15 4  * * * ...
30 8  * * * ...
45 12 * * * ...
0  17 * * * ...
15 21 * * * ...   

WARNING : It would run with larger/shorter intervals on DST change though. 警告 :虽然DST更改会以较大/较短的间隔运行。

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

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