0


Did anyone notice or is it happened to him that EDIT: a system.Timers.Timer under windows service stop invoking after couple of days when the service is running ? is there some protocol that need to be kept in order to check that the timers are running.

guyl
  • 2,158
  • 4
  • 32
  • 58
  • 1
    Could this timer have been garbage collected? Also when you say *Timer* could you be a little more specific (in terms of .NET class) what do you mean as right now I can think of at least 10 different ways to implement a timer in .NET. Some will be more adapted to a service application, others to a desktop application. – Darin Dimitrov May 29 '11 at 06:55
  • sorry about that i have edited the post. i dont think it is GB since it is a living class within a singleton – guyl May 29 '11 at 07:25
  • Have you declared the timer as a member of a class or within a method? – ChrisWue May 29 '11 at 07:45
  • No of course not, its a member of a class with in a singleton. its stops working after approximately two days that it worked fine. – guyl May 29 '11 at 07:54
  • Do you catch exceptions in the handler of the Elapsed event? – mgronber May 29 '11 at 08:20
  • Yes, do you think that there is some kind of exception that disables the Timer ? – guyl May 29 '11 at 08:54
  • Well guys, look at this [article](http://support.microsoft.com/kb/842793) by Microsoft, they have a bug in `System.Timers`. In short under a window service a timer stops working after some time. – guyl Jul 13 '11 at 06:30
  • This is exactly what I suggested you try in your other post: http://stackoverflow.com/questions/6671652/filesystemwatcher-stops-raising-events-after-a-period-of-time/6672438#6672438 – Gustavo Mori Jul 13 '11 at 06:41
  • Yes i know thank you i had this question regarding Timers, my other question about Events, All the rap to you Gustavo – guyl Jul 13 '11 at 06:52

0 Answers0