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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timer

Status
Not open for further replies.

LouisC4

Programmer
Jul 26, 2003
54
US
Hi,

I am using a timer with an interval of 5 minutes to check scheduled emails to be sent out. What I will like to know is if the Timer takes up a lot of resources to keep checking every 5 minutes to send out emails.

I don't know if I should be worring about this.

I apologize if this is a silly question.

Thanks,

Louis
 
If the only reason for this exe is to check emails every 5 minutes then you could try calling the Sleep API function. Using a timer means that the exe is always running and is continually checking "is it time yet?". The alternative is to let the Windows API put this process to sleep so that it only runs once every five minutes.

Geoff Franklin
 

Or use the Task scheduler, which starts the application and once it has finished checking it quits the application and only restarts five minutes later.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top