Log.Debug("SchedulerForWorkflow started");
try
{
string FDBRunEnabled = ConfigurationManager.AppSettings["EnableFDBRun"];
string cronExpr = ConfigurationManager.AppSettings["CronExpr"];
Log.Debug("Datageneration is Enabled" + FDBRunEnabled);
Log.Debug("Cron expression " + cronExpr);
if (FDBRunEnabled.Equals("true") && cronExpr != null)
{
IScheduler scheduler = await StdSchedulerFactory.GetDefaultScheduler();
scheduler.Start();
IJobDetail job = JobBuilder.Create<JobInterface>().Build();
ITrigger trigger = TriggerBuilder.Create()
.WithIdentity("JobInterface", "IDG")
.WithCronSchedule(cronExpr)
.WithPriority(1)
.Build();
await scheduler.ScheduleJob(job, trigger);
while (true) Thread.Sleep(6000);
}
}
catch(Exception e)
{
Log.Debug("Exception at SchedulerForWorkflow : "+e.Message);
}
Log.Debug("SchedulerForWorkflow Ended");
这是我的代码调度程序正在初始化并运行作业,但是运行我的作业需要大约45分钟,在此之前调度程序正在初始化和完成,我的作业运行不成功,它处于运行状态时间。 我的日志文件
2018-06-11 07:15:44,669 [1] DEBUG BNB.WebApi.Scheduler.SchedulerForWorkflow – SchedulerForWorkflow started 2018-06-11 07:15:44,700 [1] DEBUG BNB.WebApi.Scheduler.SchedulerForWorkflow – Datageneration is Enabledtrue 2018-06-11 07:15:44,700 [1] DEBUG BNB.WebApi.Scheduler.SchedulerForWorkflow – Cron expression 0 17 7 ?
* * * 2018-06-11 07:15:44,981 [1] INFO Quartz.Impl.StdSchedulerFactory – Default Quartz.NET properties loaded from embedded resource file 2018-06-11 07:15:45,153 [1] DEBUG Quartz.Simpl.TaskSchedulingThreadPool – TaskSchedulingThreadPool configured with max concurrency of 10 and TaskScheduler ThreadPoolTaskScheduler. 2018-06-11 07:15:45,168 [1] INFO Quartz.Core.SchedulerSignalerImpl – Initialized Scheduler Signaller of type: Quartz.Core.SchedulerSignalerImpl 2018-06-11 07:15:45,200 [1] INFO Quartz.Core.QuartzScheduler – Quartz Scheduler v.3.0.4.0 created. 2018-06-11 07:15:45,200 [1] INFO Quartz.Simpl.RAMJobStore – RAMJobStore initialized. 2018-06-11 07:15:45,200 [1] INFO Quartz.Core.QuartzScheduler – Scheduler meta-data: Quartz Scheduler (v3.0.4.0) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED' Scheduler class: 'Quartz.Core.QuartzScheduler' - running locally. NOT STARTED. Currently in standby mode. Number of jobs executed: 0 Using thread pool 'Quartz.Simpl.DefaultThreadPool' - with 10 threads. Using job-store 'Quartz.Simpl.RAMJobStore' - which does not support persistence. and is not clustered.
2018-06-11 07:15:45,200 [1] INFO Quartz.Impl.StdSchedulerFactory – Quartz scheduler 'DefaultQuartzScheduler' initialized 2018-06-11 07:15:45,200 [1] INFO Quartz.Impl.StdSchedulerFactory – Quartz scheduler version: 3.0.4.0 2018-06-11 07:15:45,231 [1] INFO Quartz.Core.QuartzScheduler – Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. 2018-06-11 07:15:45,231 [6] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:15:45,340 [1] DEBUG BNB.WebApi.Scheduler.SchedulerForWorkflow – SchedulerForWorkflow Ended 2018-06-11 07:15:45,356 [6] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:16:13,888 [6] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:16:43,824 [6] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 1 triggers .......
2018-06-11 07:22:16,900 [1] DEBUG BNB.WebApi.Scheduler.SchedulerForWorkflow – SchedulerForWorkflow started 2018-06-11 07:22:16,916 [1] DEBUG BNB.WebApi.Scheduler.SchedulerForWorkflow – Datageneration is Enabledtrue 2018-06-11 07:22:16,916 [1] DEBUG BNB.WebApi.Scheduler.SchedulerForWorkflow – Cron expression 0 17 7 ?
* * * 2018-06-11 07:22:17,040 [1] INFO Quartz.Impl.StdSchedulerFactory – Default Quartz.NET properties loaded from embedded resource file 2018-06-11 07:22:17,134 [1] DEBUG Quartz.Simpl.TaskSchedulingThreadPool – TaskSchedulingThreadPool configured with max concurrency of 10 and TaskScheduler ThreadPoolTaskScheduler. 2018-06-11 07:22:17,181 [1] INFO Quartz.Core.SchedulerSignalerImpl – Initialized Scheduler Signaller of type: Quartz.Core.SchedulerSignalerImpl 2018-06-11 07:22:17,181 [1] INFO Quartz.Core.QuartzScheduler – Quartz Scheduler v.3.0.4.0 created. 2018-06-11 07:22:17,181 [1] INFO Quartz.Simpl.RAMJobStore – RAMJobStore initialized. 2018-06-11 07:22:17,196 [1] INFO Quartz.Core.QuartzScheduler – Scheduler meta-data: Quartz Scheduler (v3.0.4.0) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED' Scheduler class: 'Quartz.Core.QuartzScheduler' - running locally. NOT STARTED. Currently in standby mode. Number of jobs executed: 0 Using thread pool 'Quartz.Simpl.DefaultThreadPool' - with 10 threads. Using job-store 'Quartz.Simpl.RAMJobStore' - which does not support persistence. and is not clustered.
2018-06-11 07:22:17,196 [1] INFO Quartz.Impl.StdSchedulerFactory – Quartz scheduler 'DefaultQuartzScheduler' initialized 2018-06-11 07:22:17,196 [1] INFO Quartz.Impl.StdSchedulerFactory – Quartz scheduler version: 3.0.4.0 2018-06-11 07:22:17,212 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:22:17,212 [1] INFO Quartz.Core.QuartzScheduler – Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. 2018-06-11 07:22:17,290 [1] DEBUG BNB.WebApi.Scheduler.SchedulerForWorkflow – SchedulerForWorkflow Ended 2018-06-11 07:22:17,290 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:22:46,228 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:23:12,639 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:23:38,098 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:24:02,278 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:24:26,567 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:24:56,114 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:25:19,514 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:25:42,773 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers 2018-06-11 07:26:12,616 [5] DEBUG Quartz.Core.QuartzSchedulerThread – Batch acquisition of 0 triggers
这是否导致我的任务/工作运行出现问题,我没有抓到