I have to run two cron jobs for the following scenarios.
I have another 4 cron jobs which needs to be implemented in my project. 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.
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
* * * * * 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)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.