Program.cs 769 B

1234567891011121314151617181920212223242526272829
  1. using SMP.Tool.TimingTask.Core;
  2. using SMP.Tool.TimingTask.Jobs;
  3. using System;
  4. using System.Threading.Tasks;
  5. using Topshelf;
  6. namespace SMP.Tool.TimingTask
  7. {
  8. class Program
  9. {
  10. static async Task Main(string[] args)
  11. {
  12. // AsyncUPSFuelTaskJob asyncUPSFuelTaskJob = new AsyncUPSFuelTaskJob();
  13. //await asyncUPSFuelTaskJob.Execute(null);
  14. HostFactory.Run(x =>
  15. {
  16. x.Service<ServiceRunner>();
  17. x.RunAsLocalSystem();
  18. x.SetDescription("SMP定时任务程序");
  19. x.SetDisplayName("SMP定时任务程序");
  20. x.SetServiceName("SMP定时任务程序");
  21. x.EnablePauseAndContinue();
  22. });
  23. }
  24. }
  25. }