On Windows Server 2003, I have a task that is scheduled to run every morning at 12 am. The time it takes to run varies since it is a search engine spider that crawls a website. I want to have a batch script run when the task ends. Is there a way to do that using Task Scheduler or no?


The simplest way would be to use a batch file that runs the first command with START /WAIT.


start /wait spider.bat

The batch file will then pause and wait until the "spider" task finishes and then run your next script. (Or an executable, this will work for executables as well as .bat/.cmd scripts)

  • Will this work for executables as well? I have 4 tasks that need to be scheduled one right after the other. So can I do start /wait task1.exe start /wait task2.exe start /wait task3.exe start /wait task4.exe all in a .bat file and have the bat file kicked off by the task scheduler? – drizzie Aug 5 '13 at 14:43

By far the easiest and most reliable way is to add the currently scheduled task to the start of your batch file and then run that batch file via the task scheduler instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.