-
I have a program that runs an archiving routine. I want to give the user the option to schedule the program for a certain time every day. How do I go about this??
Or how do I access the windows schedular from my program??
Thanks for any suggestions
[Edited by kanejone on 09-14-2000 at 10:39 AM]
-
In a timer place
Code:
static flag as boolean, old as integer
If not flag then
if hour(now)>=8 and minute(now)>=17 and second(now) >=22 then
'run your thing
flag=true
end if
else
if hour(now)<old then
flag=false
end if
old=hour(now)
end if
-
Thanks a lot for that. Is there any way to let the user set the time????
-
Yep, you could have a inputbox asking for the date, use isdate function to determine if it's valid, and then compare the dates in the procdure i gave you:
Code:
if hour(now)>=hour(yourdate) and minute(now)>=minute(yourdate) and second(now) >=second(yourdate) then
-