holemania
asked on
Batch Job - Call one after another
Hello experts,
I have multiple batch jobs that I need to run in a sequence. I don't know how long it will take each job to run, so I don't want to set a schedule.
I want to create 1 batch file that is schedule to run at 1am. Is it possible to set this batch file to execute one batch job and then once complete, to start the other one?
Example:
Call Batch1.bat......
Complete....
Call Batch2.bat........
Complete
Call Batch3.bat
I have multiple batch jobs that I need to run in a sequence. I don't know how long it will take each job to run, so I don't want to set a schedule.
I want to create 1 batch file that is schedule to run at 1am. Is it possible to set this batch file to execute one batch job and then once complete, to start the other one?
Example:
Call Batch1.bat......
Complete....
Call Batch2.bat........
Complete
Call Batch3.bat
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you. That worked wonderfully.
No problem... a little over complicating a three line batch but with the benefit of some error checking.
thanks
Steve
thanks
Steve
Start batch2.bat; and then in batch2.bat I have the line Start batch3.bat; and then have my exit after the start batchx.bat to close the current one
@echo off
commands
commands
start batch2.bat
exit