Hi Brian,
I think we do need to check the data to know if a program needs to be
started. We know that the OS is running based on one real-time clock which
help to do the thread schedule. In the low level the OS utilize the clock
IRQ to do the job. On the high level, i.e. the our program running on the
OS, OS provides the similar machanism, i.e. the timer function, in .net
framework the Timer is the wrap class for the OS provided timer.
I think a normal and recommend approach is to check the scheduled programs
trigger time periodically e.g. every 1 minutes. Once we find that there
will be one program will be running in one minutes(e.g. after 30 seconds,
the program need to be started), then we can start another timer and set
its Interval to be 30000(30 seconds) and handle its Elapsed event, thus, 30
seconds later, the event handler will be called to start the program.
Here is a C# program, you may try to take a look.
http://www.thecodeproject.com/csharp/scheduler.asp
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.