123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Quartz;
- using System.Diagnostics;
- using log4net;
- using System.Windows.Forms;
- namespace TimeSchedule
- {
- public class testjob1 : IJob
- {
- private static readonly ILog Logger = LogManager.GetLogger(typeof(testjob1));
- public void Execute(IJobExecutionContext context)
- {
- //MessageBox.Show("AAA");
- Logger.Info("TestJob1测试");
- int i = 10;
- }
- }
- //单实例运行
- [DisallowConcurrentExecution]
- public class testjob2 : IJob
- {
- private static readonly ILog Logger = LogManager.GetLogger(typeof(testjob2));
- public void Execute(IJobExecutionContext context)
- {
- //MessageBox.Show("BBB");
- Logger.Info("TestJob2测试");
- int i = 10;
- }
- }
- }
|