P
pamelafluente
Hi guys!
I want to do a large number of scheduled task (say 80). Each task can
be run at a certain time every given weekday. For instance at 10am and
5pm on each monday, etc.
I would like to ask what is the best approach to check and run the
scheduled events.
The first (perhaps silly) thing that come up in my mind is to use a
Timer and on the"Tick" event to check if there are task that need to be
fired.
However this approach seems awkward and it would waste a lot of
resources. I think that if I keep busy my program checking at each tick
whether there are task to run, I would only degrade the whole
performance of the program (which must do several other heavy tasks).
Could anyone be so kind as to suggest me what is the best approach to
this problem. Is there a way to have the events fired directly at the
given times without using the times stuff, or using it more
appropriately ?
Thank you very much in advance.
-Pam
I want to do a large number of scheduled task (say 80). Each task can
be run at a certain time every given weekday. For instance at 10am and
5pm on each monday, etc.
I would like to ask what is the best approach to check and run the
scheduled events.
The first (perhaps silly) thing that come up in my mind is to use a
Timer and on the"Tick" event to check if there are task that need to be
fired.
However this approach seems awkward and it would waste a lot of
resources. I think that if I keep busy my program checking at each tick
whether there are task to run, I would only degrade the whole
performance of the program (which must do several other heavy tasks).
Could anyone be so kind as to suggest me what is the best approach to
this problem. Is there a way to have the events fired directly at the
given times without using the times stuff, or using it more
appropriately ?
Thank you very much in advance.
-Pam