Execute code at exact time
-
Hey guys I am hoping someone can help. What I want to do is send an e-mail at 7:00 AM once a day. I know how to send an e-mail, and i thought i could do this using either a timer or a thread. This is also going to be a windows service in case that makes a difference. Thanks, Travis Combs
-
Hey guys I am hoping someone can help. What I want to do is send an e-mail at 7:00 AM once a day. I know how to send an e-mail, and i thought i could do this using either a timer or a thread. This is also going to be a windows service in case that makes a difference. Thanks, Travis Combs
Here you are: Scheduling Future Dates [^] A New Task Scheduler Class Library for .NET[^]
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
-
Hey guys I am hoping someone can help. What I want to do is send an e-mail at 7:00 AM once a day. I know how to send an e-mail, and i thought i could do this using either a timer or a thread. This is also going to be a windows service in case that makes a difference. Thanks, Travis Combs
Will Timer1 control be solution for you? If yes then enable Timer1 and check current time if is 7:00 AM and in that case execute code which send email.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
-
Will Timer1 control be solution for you? If yes then enable Timer1 and check current time if is 7:00 AM and in that case execute code which send email.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
I always avoid using timer objects. Timer events are the absolute lowest priority events in Windows, and on a busy system, there's a very real possibility that you could miss one. Always use a threaded scheduling implementation. It's much more reliable and customizable.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I always avoid using timer objects. Timer events are the absolute lowest priority events in Windows, and on a busy system, there's a very real possibility that you could miss one. Always use a threaded scheduling implementation. It's much more reliable and customizable.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001