tags:

views:

192

answers:

5

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 could 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

A: 

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?

Anon.
+2  A: 

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.

Reed Copsey
+2  A: 

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.

Alexander Gessler
A: 

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

RKitson
we did take a look at it, but we decided to implement our own.
pdiddy
A: 

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.

Dana