Reputation: 5441
I have two tasks:
What I'm trying to do is to trigger task number 2 after task number 1 has already triggered. After WAMP's task has ran I would like to run Google Chrome's task.
Think of it as a callback function. When task 1 has finished running, trigger task 2.
Note: I'm trying to do that using windows 8.1 task scheduler
Upvotes: 10
Views: 16607
Reputation: 19
Lets say, I have Task1 scheduled on my server, now I want to execute Task2 on successful completion of Task1, then create Task2 with trigger as below
<QueryList>
<Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational">
<Select Path="Microsoft-Windows-TaskScheduler/Operational">*[EventData
[@Name='TaskSuccessEvent'][Data[@Name='TaskName']='\Task1']]</Select>
</Query>
</QueryList>
Upvotes: 0
Reputation: 1516
You can Trigger the Task2 with 'On an event' option. Go to (Setting - Custom -Edit Event Filter) and put this code in the XML tab.
<QueryList>
<Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational">
<Select Path="Microsoft-Windows-TaskScheduler/Operational">*[EventData
[@Name='TaskSuccessEvent'][Data[@Name='TaskName']='\Task1']]</Select>
</Query>
</QueryList>
Upvotes: 11