centOS:
使用crontab -e //编辑
crontab -l //查看定时任务
生效运行:
先安装;
systemctl enable crond
systemctl start crond
停止:systemclt stop crond
说明:
出现Redirecting to /bin/systemctl start crond.service, 即service crond start 需要替换为systemctl方式
使用crontab -e后,正常添加,启动crond 但是并没有起作用, 这是因为编辑crond任务有问题: 完整: SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 定时任务。。