TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
trufun101
NA
19
0
Trouble with Timers in a Windows Service
Apr 19 2004 4:30 PM
Has anyone else ran into any problems with Timer events not firing consistantly in a Windows Service? For example, I have a System.Timers.Timer that elapses every 2 seconds or so. On timer tick, I stop the timer...process the pending jobs...and restart the timer. myTimer_Elapsed() { myTimer.Stop(); //get jobs and process myTimer.Start(); } This will work for some period of time...say 3 or 4 hours...but eventually it stops working, and I have to restart the service. I've been told to add the following line after "myTimer.Stop();" myTimer.AutoReset = true; Does anyone know of another solution? I want to ensure that this AutoReset is a valid solution. Thanks, -Chris B.
Reply
Answers (
2
)
Windows authentication and Domain
Subracting information from a SQl Database