eb65,
In addition to the other comments, I normally use either
System.Threading.Timer or System.Timers.Timer and handle the respective
callback or Elapsed event.
If you us System.Timers.Timer, be certain to review the following KB article
first:
BUG: The Elapsed event of the System.Timers.Timer class is not raised in a
Windows service
http://support.microsoft.com/default...b;en-us;842793
For info on the 3 timers (the above two & System.Windows.Forms.Timer) see:
Comparing the Timer Classes in the .NET Framework Class Library
http://msdn.microsoft.com/msdnmag/is...T/default.aspx
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
<eb**@pipeline.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
|I have a need to write a Windows Service application in VB.Net that
| needs to continuously do some processing, wait ten minutes, then
| repeat. What is a good approach to coding this type of thing?
| Basically, I want something like:
|
| While True
| -- do some processing
|
| -- sleep 10 minutes
|
| End While
|
| I can't put a loop like this in the OnStart event handler, because then
| the service never finishes starting in MMC. I thought of using a Timer
| instead of a Sleep, but I don't want the processing to occur every 10
| minutes when the Timer.Elapsed event fires - I want a 10 minute pause
| after the processing completes.
|
| Has anyone implemented a similar application, or have any suggestions
| as how this can best be done?
|
| Thanks in advance for any replies.
|