1.
设置邮箱
[root@server ~]# yum install s-nail -y
[root@server ~]# vim /etc/s-nail.rc
编写脚本
[root@server ~]# vim homework1.sh
设置定时任务
[root@server ~]# vim /etc/crontab
2.
[root@server ~]# vim homework2.sh
测试:
3.
[root@server ~]# vim homework3.sh
测试: