摘要: 将以上文件保存为serverMonitor.sh 并将该脚本文件的执行添加到定时任务中,使用以下命令打开计划任务编辑页面 crontab -e -u root 在编辑页面,加上一行 * * * * * /usr/bin/sh /root/serverMonitor.sh 保存成功后用 crontab 阅读全文
posted @ 2017-11-17 16:47 Claire_xu 阅读(1623) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python # -*- coding:UTF-8 -*- import sys import smtplib import email.mime.multipart import email.mime.text server = 'smtp.163.com' port = '25' def sendmail(server,port,user,pwd,msg): ... 阅读全文
posted @ 2017-11-17 15:35 Claire_xu 阅读(340) 评论(0) 推荐(0) 编辑