|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Timer ellapsed event triggered indefinitlyService with the .NET Framework 1.1 SP1, the following C# code: ---------------------------------------------------------- public delegate void JobDelegate(); private Timer _timer; static private TimeSpan OneDay = new TimeSpan (1, 0, 0, 0); private JobDelegate _job; protected void TimerElapsed (object args) { _job.DynamicInvoke (null); } // That's the Windows Service Start() method public void Start() { .... // Initialization of local variable 'dueTime' _timer = new Timer (new TimerCallback (TimerElapsed), null, dueTime, OneDay); } ---------------------------------------------------------- Works fine for about a month (that is the function referenced by the delegate `_job' is called daily at 'dueTime') but suddenly, one day, will cause the function referenced by the delegate `_job' to be called in what seems to be an infinite loop until the service is stopped. I'm aware of http://support.microsoft.com/kb/900822/ but this looks like a different problem (haven't installed the patch though). Did anyone experience the same problem? Any Idea? Thanks a lot, Raphael. |
|||||||||||||||||||||||