示例#1
0
        /// <summary>
        /// Called by the Scheduler after a <see cref="IJobDetail" />
        /// has been executed, and be for the associated <see cref="ITrigger" />'s
        /// <see cref="IOperableTrigger.Triggered" /> method has been called.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="jobException"></param>
        public void JobWasExecuted(IJobExecutionContext context, JobExecutionException jobException)
        {
            Logger.InfoFormat("JobWasExecuted: {0}, {1}", context.JobDetail.Key.Name, context.JobDetail.Key.Group);

            var auditLog = GetAuditLog("JobWasExecuted", context);
            if (null != jobException)
            {
                auditLog.ExecutionException = jobException.ToString();
            }
            
            _persistanceStore.InsertAuditLog(auditLog);
        }
 public override void JobWasExecuted(IJobExecutionContext context, JobExecutionException jobException) {
     var description = "Job was executed: " + Describe(context);
     if (jobException != null)
         description += string.Format("<br/>with exception: <pre>{0}</pre>", WebUtility.HtmlEncode(jobException.ToString()));
     entries.Add(new LogEntry(description));
 }