E
eb65
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.
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.