Program.cs 550 B

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