Link to home
Start Free TrialLog in
Avatar of giveindia
giveindia

asked on

Daisy Chaining Scheduled Tasks in Task Scheduler

I have a Windows Server 2012 in which I have two tasks setup A and B. Currently A is scheduled to run at 3:30 a.m while B is schedule to run at 4:00 a.m. I would like to daisy chain these tasks so that once Task A finishes completion it starts Task B automatically. Any ideas on how this can be done ?

Thanks,
Aditya
ASKER CERTIFIED SOLUTION
Avatar of Zac Harris
Zac Harris
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kimputer
Kimputer

If the first task is a batch or similar, at the end of the job give the command to start taskB

for a batch it would be:

rem task a
echo do tasks for a
echo job done, start task b
SCHTASKS /Run "task b (or whatever the task name is)"

Open in new window

Agree with Kimputer as an option to trigger the next task.

Depending on what is being run
You could define the schedule such that it runs task A && Task B
Only on successful exit of task A will task b run under the scheduler.
Avatar of giveindia

ASKER

That worked great !