You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb.Job.Common/MyshippingCommonService.cs

33 lines
815 B
C#

3 years ago
using Quartz.Impl;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
namespace DSWeb.Job.Common
{
partial class MyshippingCommonService : ServiceBase
{
public MyshippingCommonService()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
StdSchedulerFactory.GetDefaultScheduler().Start();
StdSchedulerFactory.GetDefaultScheduler().ListenerManager.AddSchedulerListener(new JobListener());
}
protected override void OnStop()
{
StdSchedulerFactory.GetDefaultScheduler().Shutdown();
}
}
}