c# 在不同的时间运行2个(或更多)进程?
如何在不同的进程中运行不同的任务?
就我而言,我将有 2 个任务,一个任务每 1 分钟运行一次,另一个任务每 10 分钟运行一次,
重点是每个任务都完全独立于另一个任务,
如何使它们在同一个程序中工作?
how to run different tasks in different process?
in my case I will have 2 tasks one runs every 1 mint the other will run every 10 mints
the point is each one is totally independent from the other
how to make them work within the same program?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我这样做的方法是创建一个 Windows包含 计时器。 计时器定期检查是否需要运行每个进程,并在需要运行时使用
希望有帮助!
The way I'd do it is to create a Windows Service that contains a Timer. The Timer checks at regular intervals if it is time to run each process, and when it is time to run starts each process using either
Hope that helps!