If you want to βplanβ a way to do something at a given time, there are several ways to do it. I would not use Thread.Sleep() because it would tie the thread without doing anything, which is a waste of resources.
A common practice is to use the polling method, which wakes up on a regular schedule (let them speak once a minute) and looks at the general list of tasks to be performed. System.Timer can be used for the polling method:
aTimer = new System.Timers.Timer(10000); aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
The OnTimedEvent method may contain code that supports a collection of "tasks" to execute. When the task comes, the next timer start will cause it to execute.
source share