Exemplo n.º 1
0
        static void Main(String[] args)
        {
            XDI.Run();

            GlobalConfig.Environment = ConfigurationManager.AppSettings["Environment"];

            String jobsConfigFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "CPI.ScheduleJobs.Development.config");

            if (GlobalConfig.Environment == EnvironmentType.Production.ToString())
            {
                jobsConfigFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "CPI.ScheduleJobs.config");
            }

            var service = new QuartzService(jobsConfigFilePath);

            service.Start(null);
            Console.WriteLine("CPI定时调度服务已启动...");
            Console.ReadKey();
        }
Exemplo n.º 2
0
 protected override void OnStart(string[] args)
 {
     _service.Start();
     // fsToken = FileSystemWatcherService.Activate();
     LogsAppendersManager.Instance.Info(this.GetType(), MethodBase.GetCurrentMethod(), "Service Started");
 }