1.查看计划任务
crontab -l
2.添加计划任务
echo "*/5 * * * * /share/homes/admin/raid1_monitor.sh" >> /etc/config/crontab
echo "0 3 * * * /share/homes/admin/readd_raid1.sh" >> /etc/config/crontab
echo "5 3 * * * /share/homes/admin/fail_raid1.sh" >> /etc/config/crontab
或者直接编辑/etc/config/crontab
文件
vi /etc/config/crontab
注意:威联通上不可以用Linux下的crontab -e
命令来编辑计划任务。
3.重启计划任务服务
crontab /etc/config/crontab && /etc/init.d/crond.sh restart