|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (5 bit)
Join Date: Jun 2001
Posts: 28
|
Launching a app every X mins...
Hey, wonder if u can help.
I got a command line program (actually a game server infomation gatherer) that id like to run every let say 2 minutes. I could wip up a Vb app that shells the program, but that would load up a dos box (granted it closes when its done) every time it execs... and would minimise full screen programs I could be running. Just wondering if U could make a batch file that would loop and pause? This should be posible in C++ but ive just touched the surface of that. Im running 2k mostly btw. Thanks. |
|
|
|
|
|
#2 |
|
Member (12 bit)
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
|
You could always do this (using choice for a delay is kind of hackish, but it works:
:loop call theprogram.bat choice /t:n,60 choice /t:n,60 goto loop Here, it would delay for 120 seconds. Each "choice" will delay for 60 seconds; I used 2 because you can't specify longer than 99 seconds delay. However, this has some downsides: 1) It's kind of a hack solution 2) It won't shut down nicely (to stop, you'd have to open the window and hit ctrl+c) You may just want to look to various other options, such as thirdt-party programs, which will run apps in the background. Actually, anything win98 or nweer has a built in windows scheduler -- this will probably work for you.
__________________
Paul M. Victorey ------------------ I am not responsible for any problems that may arise as a result of following my advice. This includes, but is not limited to, computer failure, loss of data, nuclear war, famine, boils, no clean laundry, your daughter running off with a biker gang, or armageddon. Take my advice at your own risk. Last edited by Paul Victorey; 11-01-2001 at 06:12 PM. |
|
|
|
|
|
#3 |
|
Member (5 bit)
Join Date: Jun 2001
Posts: 28
|
A little jerry rigged huh? but it works!
Thanks a lot! |
|
|
|
|
|
#4 |
|
SQL nutcase
|
You can also use the AT scheduler available in NT and 2K. Just type AT /? at the console to get more info.
|
|
|
|
|
|
#5 |
|
Member (5 bit)
Join Date: Jun 2001
Posts: 28
|
Thx ill take a look, as eventually it be nice to have a transparent and hidden solution... like a service.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|