Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-01-2001, 04:43 PM   #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.
XGryph is offline   Reply With Quote
Old 11-01-2001, 06:02 PM   #2
Member (12 bit)
 
Paul Victorey's Avatar
 
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.
Paul Victorey is offline   Reply With Quote
Old 11-01-2001, 08:10 PM   #3
Member (5 bit)
 
Join Date: Jun 2001
Posts: 28
A little jerry rigged huh? but it works!
Thanks a lot!
XGryph is offline   Reply With Quote
Old 11-02-2001, 02:49 AM   #4
SQL nutcase
 
mosquito's Avatar
 
Join Date: Sep 2000
Location: Belgium
Posts: 1,136
Send a message via AIM to mosquito
You can also use the AT scheduler available in NT and 2K. Just type AT /? at the console to get more info.
mosquito is offline   Reply With Quote
Old 11-02-2001, 10:36 AM   #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.
XGryph is offline   Reply With Quote
Old 11-02-2001, 07:25 PM   #6
Member (5 bit)
 
Join Date: Jun 2001
Posts: 28
Id thought Id mention that ive found a more eligent solution (thanks DSOTM!).

Using this app here.

Basicaly from the bad file I can simple say:

Wait.exe -60 for eg for 60s pause.
XGryph is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:38 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2