Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

timer - Setting up to fire at a particular times

Status
Not open for further replies.

NCYankee1

Programmer
Mar 27, 2001
66
0
0
US
I am writing a Windows Service and I need to have the service perform some function at 10 past and 40 past every hour. How do I set up the timer to do this? I am assuming I would use system.timers.timer somehow? Thanks for your help.
 
Yes, you can do it by using a System.Timers.Timer. All you would need to to is to set the Interval property so that it fires every x minutes and then check the current time (System.DateTime.Now) to see if it is the time that you want to fire the relevant code.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top