system.timer not firing

  • Thread starter Thread starter caulker
  • Start date Start date
C

caulker

I have a simple Windows Service with a timer (system.timer).
The service seems to run just fine when I have the Timer = 1 minute, but
when I set the Timer = 15 minutes it only fires once ... then appears to
stop.

any help is greatly appreciated...
 
-----Original Message-----
I have a simple Windows Service with a timer (system.timer).
The service seems to run just fine when I have the Timer = 1 minute, but
when I set the Timer = 15 minutes it only fires once ... then appears to
stop.

any help is greatly appreciated...

Check the doc's, I've not had to play with timers for a
bit now, but I think there is a maximum time that a timer
can do, then you have to keep track of how many times it
fires for running total until you reach your max value.
 
yes, this appears to be the case. i didn't find any mention in the
System.Timer docs on MSDN concerning a maximum range for a timer, but
through trial and error this appears to be true...
thanks for the help...
 
No it's working here just fine, with the Interval set
to 5 mins. Check whether your logic is ok, especially the Interval
setting logic, and whether you're setting AutoReset to false
(should be true, the default), and whether it's getting disabled
somehow, and whether Elapsed is hooked properly.

RayO
 
There are actually three of them. The least reliable is
the Windows one, which I don't use.

I'm using the Timers one, which works just fine, and is
more accurate and reliable than the Windows one.

There is also the Threading one, which is more lightweight
and has fewer features, and may be even more reliable.

RayO
 
Back
Top