Unattended close of batch file-Windows 2000 Server Sp4

D

Davo

I have a batch file that runs on my w2000 Server DC that starts a separate
process on an AS400. This .bat file stays open to keep the process on the
AS/400 running. After IPL(reboot) of AS/400 as per a maintenance schedule,
the batch program loses contact with the AS400. What I need is to schedule
the .bat file on my w2000 server to exit and restart. I can start it no
problem with task scheduler, but how would I get windows to close it?

Thanks in advance.
 
G

G

Sounds like you want the task to both start and stop on a known schedule. On
the Settings tab of the scheduled task properties, you can set a value for
"Stop the task if it runs for _ hour(s) and _minute(s)", presumably 23 hours
and some number of minutes. Or, on the Schedule tab, choose the
[Advanced...] button. In the Advanced Schedule Options, you can choose
settings in the Repeat task group to run either until a time or for a
duration. In that group, there is a checkbox for "If the task is still
running, stop it at this time."

Does the batch file continue to the next line after the AS/400 process goes
away? That's not how I read things, but if so, you can add the EXIT command
after the command line that initiates the AS/400 process. You don't tell us
what this AS/400 process is, but I would hope it provides a graceful exit.

Greg Stigers, MCSA
this space for rent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top