Scheduling
Scheduling
Trigger a scheduled task to run after another task completes
You'd think there'd be an easy way to do this. There isn't, or at least there isn't an obvious easy way to do this. What you need to do is go task properties → Triggers → New... → Begin the task: On an event → radio button to Custom → Edit event filter → check the Edit query manually box → enter the following XML (assuming the name of the task you want to run this new task after the success of is "MyPriorTask")
Edit Event Filter | XML tab
<QueryList> <Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational"> <Select Path="Microsoft-Windows-TaskScheduler/Operational"> *[EventData[@Name='TaskSuccessEvent'][Data[@Name='TaskName']='\MyPriorTask']] </Select> </Query> </QueryList>
I mean, it's very obvious in retrospect, right? 🙄
Tags
Referenced Files
None
Subscribers
None
- Last Author
- keithzg
- Last Edited
- Apr 27 2021, 8:46 PM