本文整理汇总了C#中IScheduler.AddGlobalJobListener方法的典型用法代码示例。如果您正苦于以下问题:C# IScheduler.AddGlobalJobListener方法的具体用法?C# IScheduler.AddGlobalJobListener怎么用?C# IScheduler.AddGlobalJobListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IScheduler
的用法示例。
在下文中一共展示了IScheduler.AddGlobalJobListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Service
public Service()
{
InitializeComponent();
schedulerFactory = new StdSchedulerFactory(Common.Properties.QuartzSchedulerProperties);
scheduler = schedulerFactory.GetScheduler();
scheduler.AddGlobalJobListener(new MemcachedLogJobListener());
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
}
示例2: BackgroundJobManager
public BackgroundJobManager(MVC_Husk.Infrastructure.Logging.ILogger logger, IScheduler sched)
{
_jobs = new Jobs();
_logger = logger;
_scheduler = sched;
if (!_scheduler.IsStarted)
{
_scheduler.Start();
_scheduler.AddGlobalJobListener(new QueueUpdateManager());
QuartzNetWebConsole.Setup.Scheduler = () => _scheduler;
QuartzNetWebConsole.Setup.Logger = new MemoryLogger(10000);
}
}
示例3: Initialize
public void Initialize()
{
lock (SyncRoot)
{
if (_scheduler != null)
return;
var schedulerFactory = new StdSchedulerFactory();
_scheduler = schedulerFactory.GetScheduler();
_scheduler.AddGlobalJobListener(new GlobalJobListener());
}
}
示例4: Initialize
/// <summary>
/// Called during creation of the <see cref="IScheduler" /> in order to give
/// the <see cref="ISchedulerPlugin" /> a chance to Initialize.
/// </summary>
public virtual void Initialize(String pluginName, IScheduler sched)
{
name = pluginName;
sched.AddGlobalJobListener(this);
}