ningshuxia
2025-04-16 a67da735b33be01b24845ce03ae7551cf55ddbbc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// See https://aka.ms/new-console-template for more information
using IStation.TopShelf;
using Topshelf;
 
//PHM
HostFactory.Run(x =>
{
    x.Service<Service>();
    x.RunAsLocalSystem();
    x.SetDescription("陈行调度服务(CH)");
    x.SetDisplayName("IStation.Schedule.Ch");
    x.SetServiceName("IStation.Schedule.Ch");
    x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(300)));
    x.StartAutomatically();
});