开发者

Scheduling algorithm

Let's say I can configure some recurring job. For example, I want a certain job to be executed every 4 days starting from a start date and ending at an enddate or it can even never end.

you 开发者_如何学Pythoncould have different scheduling configuration, montly, weekly, daily, you can even have daily recurrence like every 2h from 2pm to 11pm.

I'm looking for any resources that could help, algorithms, code examples, etc

It must be a common solutions for this ... at least someone brighter has probably resolved this requirement


Why not just setup your "job" to run using cron (Unix and Unix-like) or Windows Task Scheduler (Windows)?

This lets you setup schedules like you are describing.


A cron daemon fulfills this purpose on unix-derived platforms. You could take a look into anacron's source code for details on a possible implementation of such a scheduler.


Have you taken a look at Quartz or Quartz.Net?


If this is a C# app running on Windows, the solution I typically use is to write a Console application and then schedule it using Windows Scheduler.


I'm not sure why you need an "algorithm" for this. It sounds to me like you just want a general-purpose Date class.

Also, is this homework?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜