centos crontab定时运行shell脚本

1、安装yum install crontabs


2、创建脚本touch test.sh


3、编辑脚本vi test.sh


编辑后的test.sh还不是可执行文件,需要执行chmod 700 test.sh

4、编辑crontab -e (类似于vi操作)

20 23 * * * /home/pe/test.sh

表示每天晚上23:20运行脚本test.sh


5、手动启动crontab服务:service crond start


深入学习:

http://www.ha97.com/910.html

https://www.cnblogs.com/chen-lhx/p/5996781.html

https://www.cnblogs.com/kerrycode/p/3238346.html

https://blog.csdn.net/baidu_35757025/article/details/64437792

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native