Page MenuHomePhorge

Scheduling
Updated 1,334 Days AgoPublic

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 propertiesTriggersNew...Begin the task: On an eventradio button to CustomEdit event filtercheck the Edit query manually boxenter 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? 🙄

Last Author
keithzg
Last Edited
Apr 27 2021, 8:46 PM