View Single Post
  #1 (permalink)  
Old June 17th, 2004, 02:55 AM
jaucourt jaucourt is offline
Friend of Wrox
Join Date: Jul 2003
Location: York, , United Kingdom.
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default Timers in a Windows Service

I have a fairly simple windows service I've designed, but after deploying it I found it wasn't working. After a bit of messing about I got remote debugging working, and found that the reason was that the timer wasn't ticking. I created a new service, which would write to a text file on every timer tick (once every 60,000 milliseconds, or 1 minute), and this doesn't work either.

Now the timer.enabled property defaults to false, but in the OnStart sub I set it to true and again in the OnStop I set it to false. The timer is definitely enabled, because I also put Pause and Continue routines in the first service and when stepping though these, the timer.enabled property does change (and is set to true when exiting the Continue routine).

Anyone else encountered a similar problem?

Reply With Quote