protected override void OnStart(string[] args) { try { Quartz.Core.IOC.ObjectContainer.ApplicationStart(new Quartz.Core.IOC.AutoFacContainer()); if (this.pcScheduler == null) { pcScheduler = Scheduler.Create(); } pcScheduler.Start(); owinHelper = OwinHelper.Create(SysConfig <ProjectInstaller> .OwinPort); owinHelper.Start(); } catch (Exception ex) { Log4.Error(ex.Message); Log4.Error(ex.StackTrace); } }
static void Main(string[] args) { ObjectContainer.ApplicationStart(new Quartz.Core.IOC.AutoFacContainer()); //ITest _ITest = ObjectContainer.Current.Resolve<ITest>(); //_ITest.SayHello(); //Console.ReadLine(); var pcScheduler = Scheduler.Create(); pcScheduler.Start(); OwinHelper owinHelper = OwinHelper.Create("8099"); owinHelper.Start(); Console.ReadLine(); //Quartz.Core.Log4net.Log4.Info("test......."); //Console.ReadLine(); }
static void Start() { Log4.Info("开始启动作业..."); ObjectContainer.ApplicationStart(new Quartz.Core.IOC.AutoFacContainer()); ITest _ITest = ObjectContainer.Current.Resolve <ITest>(); _ITest.SayHello(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "端口8099正在启动..."); var pcScheduler = Scheduler.Create(); //pcScheduler.Start(); OwinHelper owinHelper = OwinHelper.Create("8099"); owinHelper.Start(); _ITest.SayHello(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "端口8099启动成功!"); Console.ReadLine(); //Log4.Info(string.Format("【{0}】开始执行IJOB的[Execute]...","dddd")); //Console.ReadLine(); }