Aru*_* SS 1 linux cron crontab
对于以下场景,我必须运行两个 cron 作业。
我还有 4 个 cron 作业需要在我的项目中实施。但所有这些都可以从上述两种情况中得出。
第一个很容易。
12 9 * * 1-5 <full_path>/job1.php
Run Code Online (Sandbox Code Playgroud)
第二个很棘手。我把它分成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
Run Code Online (Sandbox Code Playgroud)
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)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3158 次 |
| 最近记录: |