GetSpTimerLocal.cs 806 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections.Generic;
  2. using System.Threading;
  3. using MySystem;
  4. public class GetSpTimerLocal
  5. {
  6. public readonly static GetSpTimerLocal Instance = new GetSpTimerLocal();
  7. private GetSpTimerLocal()
  8. { }
  9. public void Start()
  10. {
  11. Thread th = new Thread(DoWorks);
  12. th.IsBackground = true;
  13. th.Start();
  14. }
  15. //核对执行结果,并保存数据
  16. public void DoWorks()
  17. {
  18. List<int> ids = new List<int>();
  19. // ids.Add(12);
  20. // ids.Add(13);
  21. ids.Add(14);
  22. // ids.Add(29);
  23. // ids.Add(18);
  24. ids.Add(19);
  25. ids.Add(32);
  26. foreach (int id in ids)
  27. {
  28. JobMqMsg job = TaskService.Instance.GetJob(id);
  29. PublicImportDataService.Instance.Start(job);
  30. }
  31. }
  32. }