public static void StartAgent()
 {
     SchedulerConfiguration config = new SchedulerConfiguration(1000 * 60);//设置时间,此处为1分钟
     config.Jobs.Add(new AlertJob());
     Scheduler scheduler = new Scheduler(config);
     System.Threading.ThreadStart myThreadStart = new System.Threading.ThreadStart(scheduler.Start);
     schedulerThread = new System.Threading.Thread(myThreadStart);
     schedulerThread.Start();
 }
 public Scheduler(SchedulerConfiguration config)
 {
     configuration = config;
 }