Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
renuka_sasikumar
Creator III
Creator III

Bat file dependence in windows Task Scheduler

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

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
qlikviewwizard
Master II
Master II

First schedule the MorningProcess.bat to run first.

Later run the BusinessMIS.bat based on the estimated time of run of MorningProcess.bat.

Not applicable

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

renuka_sasikumar
Creator III
Creator III
Author

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

jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein