예제 #1
0
        public void Setup()
        {
            scheduler = (StdScheduler) new StdSchedulerFactory().GetScheduler().GetAwaiter().GetResult();
            var job     = JobBuilder.Create <NoOpJob>().Build();
            var trigger = (IOperableTrigger)TriggerBuilder.Create()
                          .ForJob(job.Key)
                          .WithSimpleSchedule()
                          .StartNow()
                          .Build();

            trigger.FireInstanceId = "fire-instance-id";
            trigger.SetNextFireTimeUtc(DateTimeOffset.UtcNow.AddSeconds(10));
            var bundle = new TriggerFiredBundle(job, trigger, null, false, DateTimeOffset.UtcNow, null, null, null);

            shell = new JobRunShell(scheduler, bundle);
        }
예제 #2
0
 /// <summary>
 /// Called by the <see cref="QuartzSchedulerThread" /> to return instances of
 /// <see cref="JobRunShell" />.
 /// </summary>
 public virtual void ReturnJobRunShell(JobRunShell jobRunShell)
 {
     jobRunShell.Passivate();
 }