Computing.Net > Forums > Programming > Automative scripts

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Automative scripts

Reply to Message Icon

Name: Roberto
Date: May 23, 2002 at 08:12:41 Pacific
Comment:

Hi all,

This is going to be very hard to explain as i really dont know how and in what language this should be done in.

I need to create a script that runs every minute (using window scheduler) that checks to see if a certain program is running. If it is then it waits 30 seconds and then runs another program.

Can anyone help shed some light on this??

Thanks in Advance!

Roberto



Sponsored Link
Ads by Google

Response Number 1
Name: Avi Kabizon
Date: June 14, 2002 at 01:24:48 Pacific
Reply:

Hi,

I don't think windows scheduled task, supports running a script every minute,
Instead, you can create a batch file
which looks something like this:

@ start of batch file
set PROGRAM_TO_CHECK=prog.exe
set PROGRAM_TO_RUN=run.exe
:check_process
tlist | find %PROGRAM_TO_CHECK%
if errorlevel 0 goto run
sleep 60
goto check_process
:run
sleep 30
call %PROGRAM_TO_RUN%
@ end of batch file

you'll need to make sure, you have the files: sleep.exe & tlist.exe, on the computer you're running the script from.


0
Reply to Message Icon

Related Posts

See More


enable ftp in omnishttpd ... Assembly Pixel Question



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Automative scripts

Automated Script Editing for W2K www.computing.net/answers/programming/automated-script-editing-for-w2k/3141.html

SQL Script www.computing.net/answers/programming/sql-script/12327.html

Gdisk.exe script needed www.computing.net/answers/programming/gdiskexe-script-needed/14218.html