定时器服务问题 [英] Timer Problem with Service

查看:86
本文介绍了定时器服务问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经编写了一项服务,该服务使用计时器控件每隔60秒检查一个进程

。这是安装在带有SP1的Windows 2003 Server上的。


我们遇到的问题是服务没有停止,但它是

似乎计时器进程停止了。有没有其他人遇到这个?

是什么解决方案?

We have written a service that uses a timer control to check for a process
every 60 seconds. This is installed on a Windows 2003 Server w/SP1.

The problem we are running into is that the service doesn''t stop, but it
seems the timer process stops. Has anyone else run into this? What have
been solutions?

推荐答案




" Kevin Antel <柯**** @ cqlcorp.com>写在留言中

新闻:uv ************** @ TK2MSFTNGP09.phx.gbl ...
Hi,

"Kevin Antel" <ke****@cqlcorp.com> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...
我们写了一个服务每隔60秒使用一次计时器控制来检查一个过程。它安装在带有SP1的Windows 2003 Server上。

我们遇到的问题是服务没有停止,但它似乎停止了计时器进程。有没有其他人遇到这个?什么有解决方案?
We have written a service that uses a timer control to check for a process
every 60 seconds. This is installed on a Windows 2003 Server w/SP1.

The problem we are running into is that the service doesn''t stop, but it
seems the timer process stops. Has anyone else run into this? What have
been solutions?




你使用什么Timer类?您应该使用System.Timers.Timer和

确保AutoReset设置为true


-

Ignacio Machin,

ignacio.machin AT dot.state.fl.us

佛罗里达州交通局



What Timer class r u using? You should be using System.Timers.Timer and
make sure that the AutoReset is set to true

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


我们是使用System.Timers.Timer,我们将AutoReset设置为True。

m_Timer.AutoReset = true;


" Ignacio Machin(.NET / C# MVP) < ignacio.machin AT dot.state.fl.us>在消息新闻中写了

:%2 **************** @ TK2MSFTNGP14.phx.gbl ...
We are using System.Timers.Timer and we do have AutoReset set to True.
m_Timer.AutoReset = true;

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:%2****************@TK2MSFTNGP14.phx.gbl...


凯文安特尔 <柯**** @ cqlcorp.com>在消息中写道
新闻:uv ************** @ TK2MSFTNGP09.phx.gbl ...
Hi,

"Kevin Antel" <ke****@cqlcorp.com> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...
我们编写了一个使用计时器的服务控制每隔60秒检查一次
进程。这是安装在Windows 2003 Server
w / SP1上。

我们遇到的问题是服务没有停止,但它似乎是计时器进程停止。有没有其他人遇到这个?什么有解决方案?
We have written a service that uses a timer control to check for a
process every 60 seconds. This is installed on a Windows 2003 Server
w/SP1.

The problem we are running into is that the service doesn''t stop, but it
seems the timer process stops. Has anyone else run into this? What have
been solutions?



Timer类使用什么?你应该使用System.Timers.Timer和
确保AutoReset设置为true

- Ignacio Machin,
ignacio.machin AT dot。 state.fl.us
佛罗里达州交通局



What Timer class r u using? You should be using System.Timers.Timer and
make sure that the AutoReset is set to true

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation






凯文安特尔 <柯**** @ cqlcorp.com>在消息中写道

新闻:eY ************** @ TK2MSFTNGP11.phx.gbl ...
Hi,

"Kevin Antel" <ke****@cqlcorp.com> wrote in message
news:eY**************@TK2MSFTNGP11.phx.gbl...
我们正在使用System。 Timers.Timer,我们确实将AutoReset设置为True。
m_Timer.AutoReset = true;
We are using System.Timers.Timer and we do have AutoReset set to True.
m_Timer.AutoReset = true;




服务是做什么的?

它是在第一次或几次事件之后发生的吗?

您是否正在处理所有例外情况?使用AppDomain.UnHandledException


我有一个类似的环境,我还没有遇到任何问题,计时器

(和一个filesystemwatcher)按预期工作所有的时间。



-

Ignacio Machin,

ignacio.machin at dot.state.fl .us

佛罗里达州交通局



What the service does?
Does it happen the first time or after several events?
Are you handling all the exceptions ? using AppDomain.UnHandledException

I have a similar environment and I haven''t had any problem yet, the timer
(and a filesystemwatcher) works as expected all the time.


--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


这篇关于定时器服务问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆