-
system trigger
ok i am making a program that refreshes a server at a certain time according to the system clock, i got it to restart and everything using the code :
If Time > #4:29:58 AM# And Time < #4:30:00 AM# Then
Shell "c:/phpdev/phpdev_stop.bat"
lblstatus = "Daily server restart in progress..."
ElseIf Time >= #4:34:58 AM# And Time <= #4:35:00 AM# Then
Shell "c:/phpdev/phpdev_start.bat"
lblstatus = "Daily server restart complete at 4:25:00..."
End If
ok but see the problem is, they both start simultaneously which i do not want, so i was wondering if there is a way to run the:
**Shell : "c:/phpdev/phpdev_stop.bat"**
command and then somehow make the program monitor or wait until it has finished ( "phpdev_stop.bat" takes approximately 30-40 secs to completely finish shutting down...) running that program and then when that program is finished it will then start up the server again with :
**"c:/phpdev/phpdev_start.bat"**
could it be done possibly with some sort of timer? a timer that monitors system progress or activity or something?
please help. thanks
-Mike
-
There is a WaitProcess API or something like that... it's very long and complex. Look it up in the API guide or at allapi.net, and then search it on the forum. It's been answered tons of tims before.