up vote 1 down vote favorite
share [g+] share [fb]

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?

link|improve this question

50% accept rate
feedback

migrated from superuser.com Aug 25 '09 at 4:18

This question came from our site for computer enthusiasts and power users.

2 Answers

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

E.g.

start /wait spider.bat
secondjob.bat

The batch file will then pause and wait until the "spider" task finishes and then run your next script.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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