Example #1
0
        protected virtual void OnJobExecuted(JobExecutedEventArgs e)
        {
            EventHandler <JobExecutedEventArgs> handler = JobExecuted;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Example #2
0
        public void JobWasExecuted(IJobExecutionContext context, JobExecutionException jobException)
        {
            JobKey jobKey  = context.JobDetail.Key;
            string message = string.Format("Job Key:{0} - Trigger Key:{1} - Start Time:{2} - Schedule Fire Time: {3}", context.JobDetail.Key, context.Trigger.Key, context.Trigger.StartTimeUtc, context.ScheduledFireTimeUtc);

            log.Debug(message);

            var e = new JobExecutedEventArgs();

            e.JobDetail = context.JobDetail;
            e.Trigger   = context.Trigger;

            OnJobExecuted(e);
        }
 private static void OnJobExecuted(object sender, JobExecutedEventArgs e)
 {
     string message = string.Format("JOB EXECUTED: Job Key:{0} - Trigger Key:{1}", e.JobDetail.Key, e.Trigger.Key);
     Console.WriteLine(message);
 }