/// <summary>
        /// 调度器发生错误时执行
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="cause"></param>
        public void SchedulerError(string msg, SchedulerException cause)

        {
            var operateType  = "运行";
            var operateState = "异常";
            var subject      = "调度器运行发生异常";

            _sendMail(subject, cause.GetBaseException(), Log4NetKeys.Log4netSchedulerErrorKey, CustomerLogUtil.Error, operateState, operateType);
        }
        public Task SchedulerError(string msg, SchedulerException cause, CancellationToken cancellationToken = default(CancellationToken))
        {
            var operateType  = "运行";
            var operateState = "异常";
            var subject      = "调度器运行发生异常";

            _sendMail(subject, cause.GetBaseException(), operateState, operateType);
            return(Task.FromResult <int>(1));
        }
Пример #3
0
        /// <summary>
        /// 调度器发生错误时执行
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="cause"></param>
        public void SchedulerError(string msg, SchedulerException cause)

        {
            var operateType  = "运行";
            var operateState = "异常";
            var subject      = "调度器运行发生异常";

            _sendMail(subject, cause.GetBaseException(), Log4NetKeys.Log4netSchedulerErrorKey, CustomerLogUtil.Error, operateState, operateType);


            //var schedulerError = CustomerLogFormatUtil.LogSchedulerMsgFormat(_localIP, quartzServerName, operateType, operateState);
            //CustomerLog.Error(log4netSchedulerErrorKey, schedulerError, cause.GetBaseException());
            //_sendMail(subject, schedulerError);
        }
Пример #4
0
 public void SchedulerError(string msg, SchedulerException cause)
 {
     //throw new NotImplementedException();
     this.Send(string.Format("异常 : {0}\r\n{1}", msg, cause.GetBaseException().StackTrace));
 }