[英]cron job to run each minutes from monday to friday from 9:15AM to 3:30PM
I have to run two cron jobs for the following scenarios. 在以下情况下,我必须运行两个cron作业。
I have another 4 cron jobs which needs to be implemented in my project. 我还有另外4个Cron工作,需要在我的项目中实施。 But all that can be derived from the above two scenarios. 但是所有这些都可以从上述两种情况得出。
First one is easy. 第一个很简单。
12 9 * * 1-5 <full_path>/job1.php
Second one is tricky. 第二个是棘手的。 I split that into 3 entries. 我将其分为3个条目。
15-59 9 * * 1-5 <full_path>/job2.php
* 10-14 * * 1-5 <full_path>/job2.php
0-30 15 * * 1-5 <full_path>/job2.php
Cron Syntax Cron语法
* * * * * command to be executed
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ │
│ │ │ │ └───── day of week (0 - 6) (0 is Sunday, or use names)
│ │ │ └────────── month (1 - 12)
│ │ └─────────────── day of month (1 - 31)
│ └──────────────────── hour (0 - 23)
└───────────────────────── min (0 - 59)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.