Windows 2008 – Running a Scheduled Task after another

I had a problem with my Windows 2008 SQL Server.

I have a scheduled task to handle the backups of the backups with robocopy and a very small disk.

I thought i could just delete the files after copying them to a network drive, but this is a lot harder than it look.

It looks like Windows Task Scheduler does not permit to run a task after another one has finished despite  the existence of an event log showing the task starting, running and completing.

However it is possible to define Custom Event, though the standard filter does not allow much control over the selection of the events.

So i found this XML to place in the Custom Event

1 2 3 4

Now insert this XML in the text box and where you read copy backup replace with the name of your previous task:

<QueryList> 
   <Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational"> 
      <Select Path="Microsoft-Windows-TaskScheduler/Operational">*[EventData [@Name='TaskSuccessEvent'][Data[@Name='TaskName']='\copy backup']]</Select> 
   </Query> 
</QueryList>

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *