//开始安排作业 private void ScheduleJob() { //取出所有的作业 IEnumerable <ScheduleJob_Details> jobDetails = _iSchedule.ListScheduleDetails(); if (jobDetails != null) { foreach (ScheduleJob_Details detail in jobDetails) { ScheduleJobByPlan(_QtzScheduler, detail); } } }
public dynamic GetScheduleDetails() { var details = bll.ListScheduleDetails().ToList(); var pcScheduler = Scheduler.Create(); foreach (var item in details) { var _job = pcScheduler._QtzScheduler.GetJobDetail(JobHelper.GetJobKey(item)).GetAwaiter().GetResult(); item.isRunning = _job != null; } var jsonStr = JsonConvert.SerializeObject(details); return(jsonStr); }