Run on Date and time
I have a program that i need to run a function on a specific date and or time. How do you do this?
Thank you in advance.
[132 byte] By [
strych9] at [2007-11-18 17:41:27]

# 1 Re: Run on Date and time
Do you need to run that programm at specific time, or do you have it running and want to call a function at that time?
# 3 Re: Run on Date and time
Then when your program starts (in InitInstance()?) set a timer for the time difference between target time and current time, and call your function when you'd get OnTimer event.
One minor problem - since SetTimer() takes time in milliseconds, you might overflow your int. In such case, simply set another timer instead, where you would repeat this action again, until there is no overflow.