C# Running several tasks at different intervals
Posted
by Nir
on Stack Overflow
See other posts from Stack Overflow
or by Nir
Published on 2010-04-01T08:26:29Z
Indexed on
2010/04/01
8:33 UTC
Read the original article
Hit count: 245
A design question:
I'd like to build a Windows service that executes different commands at different intervals. For simplicity's sake, let's say I want to run some batch files.
The input it gets is a list of files and the intervals at which to execute.
For example:
a.bat - 4 minutes
b.bat - 1 minute
c.bat - 1 minute
d.bat - 2 minutes
I was thinking about sorting them according to intervals, and then setting a timer for each of the intervals.
I'm not sure this is the best solution and I'd be happy to hear some feedbacks.
Thanks!
© Stack Overflow or respective owner