Program.cs 522 B

123456789101112131415161718192021222324
  1. using System;
  2. using Topshelf;
  3. namespace XYY.Tool.QuotaReduction
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. HostFactory.Run(x =>
  10. {
  11. x.Service<ServiceRunner>();
  12. x.RunAsLocalSystem();
  13. x.SetDescription("定时任务程序");
  14. x.SetDisplayName("定时任务程序");
  15. x.SetServiceName("定时任务程序");
  16. x.EnablePauseAndContinue();
  17. });
  18. }
  19. }
  20. }