简体   繁体   English

代码任务计划程序建议

[英]Code Task Scheduler Suggestions

I'm trying to determine if something exists that allows you to run code in a distributed way. 我正在尝试确定是否存在某种允许您以分布式方式运行代码的东西。 Each code task will have an Id and allow for smart scheduling. 每个代码任务都会有一个ID,并允许智能调度。

  1. Does not allow code with the same ID to run at the same time. 不允许同时运行具有相同ID的代码。 Task will wait in a queue before being executed. 任务将在执行之前先在队列中等待。
  2. Task can trigger other tasks to be run. 任务可以触发其他任务运行。
  3. If a multiple tasks trigger the same task (determined by id) to run, only one task will be triggered and not two. 如果多个任务触发了同一任务(由id确定)运行,则将仅触发一个任务,而不触发两个任务。

It shouldn't be too difficult to write your own task scheduler and deploy it as a Windows service. 编写自己的任务计划程序并将其部署为Windows服务应该并不难。 This way you can ensure the scheduling rules you have outlined are followed. 这样,您可以确保遵循列出的计划规则。

Otherwise, you can have a look at Quartz.NET and see if it meets your needs. 否则,您可以看看Quartz.NET ,看看它是否满足您的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM