cron每天早上八点执行
时间: 2023-07-17 11:09:23 浏览: 117
你可以使用Crontab来设置定时任务,让它每天早上八点执行。在终端中输入以下命令来编辑Crontab文件:
```
crontab -e
```
在打开的文件中,添加以下行来设置定时任务:
```
0 8 * * * command_to_execute
```
在上述命令中,`0 8 * * *`表示每天的第0分钟和第8小时执行任务。`command_to_execute`是你想要执行的命令或脚本。你可以根据需要自定义这个命令。
保存并退出Crontab文件后,你的任务将会在每天早上八点执行。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)