Esempio n. 1
0
 public void CreateScheduler(QuartzNetSchedulerOption option)
 {
     _factory.CreateScheduler(option.SchedulerName, option.SchedulerID, new DefaultThreadPool()
     {
     }, new RAMJobStore()
     {
     });
 }
Esempio n. 2
0
 /// <summary>
 /// 创建一个scheduler(自定义调度器的相关参数)
 /// </summary>
 /// <param name="schedulerConfig"></param>
 public bool CreateScheduler(SchedulerConfig schedulerConfig)
 {
     try
     {
         var pool = new DefaultThreadPool()
         {
             ThreadCount = schedulerConfig.ThreadCount
         };
         _factory.CreateScheduler(schedulerConfig.SchedulerName, schedulerConfig.SchedulerId, pool, new RAMJobStore());
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }