This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您可以在MONIT中使用类似功能并评估返回代码,而不是使用CRON作业。如果状态失败,则监测将发送邮件。
有关一些其他信息,请参见 https://www.mmonit.com /monit/documentation/monit.html#service-poll-time
MONIT程序无法监视执行的CRON作业。如果将错误消息写入日志文件,则可以使用消息来发送邮件。
Instead of using a cron job you can use a similar function in monit and evaluate the return code. The monit will send a mail if the status fail.
For some additional information see https://www.mmonit.com/monit/documentation/monit.html#SERVICE-POLL-TIME
The monit program can not monitor the executed cron jobs. If error messages are written to a log file monit can use the messages to send a mail.