using log4net; using Quartz; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DSWeb.BillCenter.Service { public class JobListener : ISchedulerListener { private ILog logger = LogManager.GetLogger("JobListener"); public void JobAdded(IJobDetail jobDetail) { logger.Debug($"Job被添加:{jobDetail.JobType}"); } public void JobDeleted(JobKey jobKey) { } public void JobPaused(JobKey jobKey) { } public void JobResumed(JobKey jobKey) { } public void JobScheduled(ITrigger trigger) { } public void JobsPaused(string jobGroup) { } public void JobsResumed(string jobGroup) { } public void JobUnscheduled(TriggerKey triggerKey) { } public void SchedulerError(string msg, SchedulerException cause) { logger.Error(msg); var excep = cause as Exception; while (true) { logger.Error(excep.Message); logger.Error(excep.StackTrace); excep = excep.InnerException; } } public void SchedulerInStandbyMode() { } public void SchedulerShutdown() { logger.Debug($"SchedulerShutdown"); } public void SchedulerShuttingdown() { } public void SchedulerStarted() { logger.Debug($"SchedulerStarted"); } public void SchedulerStarting() { } public void SchedulingDataCleared() { } public void TriggerFinalized(ITrigger trigger) { } public void TriggerPaused(TriggerKey triggerKey) { } public void TriggerResumed(TriggerKey triggerKey) { } public void TriggersPaused(string triggerGroup) { } public void TriggersResumed(string triggerGroup) { } } }