Home All Groups Group Topic Archive Search About

Re: VB.Net Timer Issue

Author
29 Dec 2006 10:02 PM
DeCoder
I have the same issues with windows service and timers. Your issue is not
the only issue with windows 2003 / vb.net service timers. The  workaround MS
support suggested to keep the events firing was to periodically 'flipflop'
the timers enable state somewhere in the code . Seems stupids, but keeps the
timer going over extended periods or when 2 or more timers are used in the
service and execute in certain ways.
timer1.disable = true
timer1.enable = true

DeCoder

Show quoteHide quote
"igor" <jones_i***@yahoo.com> wrote in message
news:1167168930.265904.288150@a3g2000cwd.googlegroups.com...
>I have recently discovered that the system.Timers.Timer  from.Net
> Framework v1.1 is not reliable when used on Windows 2003 server.  When
> incorporated into a Windows Service, the timer_elapsed event will stop
> executing after 30 to 40 days.  After learning this, I found the same
> issue had been documented in the the System.Threading.Timer class as
> well.  This limits my options for having a timer based windows service
> using the .net framework.
>
> I can convert the project to .Net Framework 2.0, but I am unsure
> whether or not this will resolve the issue.
>
> Any ideas would be helpful.
>
> Thank you.
>

Author
30 Dec 2006 12:33 AM
igor
Thanks Decoder.

How often did they say to flipflop the timers; enable state?

DeCoder wrote:
Show quoteHide quote
> I have the same issues with windows service and timers. Your issue is not
> the only issue with windows 2003 / vb.net service timers. The  workaround MS
> support suggested to keep the events firing was to periodically 'flipflop'
> the timers enable state somewhere in the code . Seems stupids, but keeps the
> timer going over extended periods or when 2 or more timers are used in the
> service and execute in certain ways.
> timer1.disable = true
> timer1.enable = true
>
> DeCoder
>
> "igor" <jones_i***@yahoo.com> wrote in message
> news:1167168930.265904.288150@a3g2000cwd.googlegroups.com...
> >I have recently discovered that the system.Timers.Timer  from.Net
> > Framework v1.1 is not reliable when used on Windows 2003 server.  When
> > incorporated into a Windows Service, the timer_elapsed event will stop
> > executing after 30 to 40 days.  After learning this, I found the same
> > issue had been documented in the the System.Threading.Timer class as
> > well.  This limits my options for having a timer based windows service
> > using the .net framework.
> >
> > I can convert the project to .Net Framework 2.0, but I am unsure
> > whether or not this will resolve the issue.
> >
> > Any ideas would be helpful.
> >
> > Thank you.
> >