Two Minute Drill: Launch a task on a recorded event

Two Minute Drill: Launch a task on a recorded event

  • Comments 1
  • Likes

Good morning AskPerf! Blake here to discuss a cool “hidden” feature in Windows Vista, Server 2008, and Windows 7. This feature allows you to configure a Scheduled Task to run when a specific Event ID is logged on the system. To run a Scheduled Task to a given event, follow these steps:

1. Start Event Viewer (eventvwr.msc)

2. Under Windows Logs, select the Log that contains the event you want to associate a task with

3. Right-click the event and select Attach Task To This Event…

image

4. The Create Basic Task Wizard will then appear

5. Set the Name and Description of the task, then click Next >

6. Select Next > on the When a Specific Event Is Logged prompt

7. At this point, you can perform one of 3 actions:

image

8. Click Next >

9. Depending on which Action you created in step 7 will determine what additional values need to be entered

10. Click Next > when finished then click Finish

Now, whenever that particular Event ID is logged, your Scheduled Task will kick off. To edit/delete your Scheduled Task, follow these steps:

1. Start Task Scheduler (taskschd.msc)

2. Expand Task Scheduler Library, then click Event Viewer Tasks

3. You will see your task to the right – simply double-click your task to modify

Some items of note

· You cannot assign a task to an event in a saved log

· You cannot assign a task to an event in an analytic or debug log

Additional Resources:

· Run A Task in Response to a Given Event (Technet Article)

-Blake Morrison

 

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Hi

    When you provide such examples , it would really helpful if you also provided a way of doing it unattended from a script.