Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have one MorningProcess.bat which is scheduled in Windows Task Scheduler & also I have BusinessMIS.bat.
Now I want BusinessMIS.bat to run as soon as the MorningProcess.bat is completed.
Can anyone please help me on this as it is very urgent.
Thanks & Regards,
Renuka S
Windows task scheduler does not have any concept of task dependencies. You could create a bat file that calls each of your two bat files in the correct order and schedule that.
If you google this topic you will certainly find a scheduler with dependencies to download, but it can all be done as I suggested. If the second task is conditional on the success of the first, then return an error code from the first and use errorlevel to conditionally call the second.
First schedule the MorningProcess.bat to run first.
Later run the BusinessMIS.bat based on the estimated time of run of MorningProcess.bat.
Why don't you call the "BussinessMIS.bat" file from the "MorningProccess.bat" at the last.
So once the execution of the "MorningProccess.bat" is completed, the execution of the "BussinessMIS.bat" will start.
if the above won't work follow the instructions mentioned in the below link.
http://blogs.msdn.com/b/davethompson/archive/2011/10/25/running-a-scheduled-task-after-another.aspx
If I do the same the estimated time for MorningProcess.bat is not same everyday.
Then there will be a problem.
Is there any option where I can select to run after this same like what we do in Publisher.
Thanks & Regards,
Renuka S
Windows task scheduler does not have any concept of task dependencies. You could create a bat file that calls each of your two bat files in the correct order and schedule that.
If you google this topic you will certainly find a scheduler with dependencies to download, but it can all be done as I suggested. If the second task is conditional on the success of the first, then return an error code from the first and use errorlevel to conditionally call the second.
Hi,
Include BusinessMIS.BAT at the end of the MorningProcess.BAT.
PSB it may hel you.
cmd - How to run multiple .BAT files within a .BAT file - Stack Overflow