如果自定义计时器服务作业失败,则向管理员发送电子邮件警报-SharePoint 2013 [英] Alert email to admin if custom timer service jobs fail - SharePoint 2013

查看:66
本文介绍了如果自定义计时器服务作业失败,则向管理员发送电子邮件警报-SharePoint 2013的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果自定义计时器服务作业在Sharepoint 2013 CA中失败,如何为管理员设置警报电子邮件?

How to set up alert emails to admin if custom timer service job gets fail in Sharepoint 2013 CA?

谢谢

DK

推荐答案

当您说自定义计时器服务作业时,我将其理解为自定义代码计时器作业,如果这样的话...您可以扩展代码以在失败时将警报发送给管理员,例如...

When you say custom timer service job, I understand it as custom code timer job, if it so...you can extend your code to send the alerts to administrator when it fails, example...

尝试

{

//您的自定义计时器作业代码在这里

//your custom timer job code goes here

}

catch(异常异常)

catch(Exception exception)

{

//catch块处理失败,您需要在此部分中包含用于发送电子邮件的代码

//catch block handles if it fails, you need to include the code to send email here in this section

}

谢谢,还有其他问题.


这篇关于如果自定义计时器服务作业失败,则向管理员发送电子邮件警报-SharePoint 2013的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆