小赖子的英国生活和资讯

怎么知道你的服务器重启了?(邮件自动提醒)

阅读 桌面完整版

通过LINUX下的 crontab -e 命令可以自动在服务器重启的时候运行任务.所以你可以在CRONTAB里加入:

@reboot echo "Your VPS is rebooted" | mail -s "Reboot Warnings" im@helloacm.com

@reboot指定每次开机执行. mail 则会发邮件.开关-s设置邮件标题.

然后也许你可以通过 IFTTT 来发短信.

vps-reboot-email

英文:https://helloacm.com/how-to-set-up-email-when-your-server-reboots-using-crontab-and-mail/

强烈推荐

微信公众号: 小赖子的英国生活和资讯 JustYYUK

阅读 桌面完整版
Exit mobile version