You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
2.1 KiB
C#

using log4net;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DSWeb.Job.Common
{
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)
{
}
}
}