.Net long-running scheduled code execution
Posted
by
Prof Plum
on Stack Overflow
See other posts from Stack Overflow
or by Prof Plum
Published on 2011-01-14T14:47:16Z
Indexed on
2011/01/14
14:53 UTC
Read the original article
Hit count: 267
I am working on a couple of projects now where I really wish there was some sort of component that I could specify a time and date, and then execute some sort of method.
DateTime date = new DateTime(x,x,x,x,x,x);
ScheduledMethod sMethod = new ScheduledMethod(date, [method delegate of some sort]);
\\at the specified date, sMethod invokes [method delegate of some sort]
I know that I can do this with Windows Workflow Foundation as a long running process, which is good for certain things, but are there any alternatives? Workflow is not exactly straight forward with the details, and it would be nice to be able to deploy something more simple for light weight tasks. An example would be a method that checks a network folder once a day and deletes any files that are more than 30 days old. I realize that this may be pie in the sky dreaming, but this would be extremely useful for automating certain mundane maintinence tasks (scheduled sql operations, file system cleansing, routine email sending, etc.). It does not necessarily have to be .Net, but that is where I am coming from. Any ideas?
© Stack Overflow or respective owner