Creating an Event Timer Instance

[This is preliminary documentation and subject to change.]

Timer events may be of the absolute or interval type. Absolute timer events occur at a particular date and time, while interval timer events occur at regular intervals.

You create event timers as instances of a given class. This version of the WBEM Event Registration Viewer provides the two subclasses of __TimerInstruction, __AbsoluteTimerInstruction and __IntervalTimerInstruction. You can create an instance with either or both of these.

The first two procedures generally describe the creation of the two kinds of event timer instances. The other two procedures are examples intended to work along with the example consumers and filters.

    To create an absolute event timer instance
  1. From the drop-down list box, choose Timers.
  2. Expand the tree to expose the subclasses.
  3. Click __AbsoluteTimerInstruction, and click the New Instance button.

    —or—

  4. Right-click on __AbsoluteTimerInstruction, and choose New Instance from the pop-up menu. The Edit new instance properties dialog box appears.

  1. Click the Value field of the EventDateTime row. The Time dialog box appears.

  1. In the Time dialog box, set the date, time, and time zone.
  2. Click OK.
  3. In the TimerId field of the Edit new instance properties dialog box, type a name for the timer.
  4. Click OK to create the instance.
    To create an interval event timer instance
  1. From the drop-down list box, choose Timers.
  2. Expand the tree to expose the subclasses.
  3. Click __IntervalTimerInstruction, and click the New Instance button.

    —or—

  4. Right-click on __IntervalTimerInstruction, and choose New Instance from the pop-up menu. The Edit new instance properties dialog box appears.

  1. In the IntervalBetweenEvents field, type a value in milliseconds.
  2. In the TimerId field, type a name for the timer.
  3. Click OK to create the instance.
    To create AbsTimer

This example creates an absolute timer instruction that works with the TimerEvent consumer and AbsTimerFilter to display an event notification in the Event Viewer at a particular date and time.

  1. From the drop-down list box, choose Timers.
  2. Expand the tree to expose the subclasses.
  3. Click __AbsoluteTimerInstruction, and click the New Instance button.

    —or—

  4. Right-click on __AbsoluteTimerInstruction, and choose New Instance from the pop-up menu. The Edit new instance properties dialog box appears.

  1. Click the Value field of the EventDateTime row. The Time dialog box appears.

  1. In the Time dialog box, set the date, time, and time zone appropriately.
  2. Click OK.
  3. In the TimerId field of the Edit new instance properties dialog box, type AbsTimer.
  4. Click OK to create the instance.
    To create IntervalTimer

This example creates an interval timer that works with the TimerEvent consumer and AbsTimerFilter to display an event notification in the Event Viewer at regular intervals.

  1. From the drop-down list box, choose Timers.
  2. Expand the tree to expose the subclasses.
  3. Click __IntervalTimerInstruction, and click the New Instance button.

    —or—

  4. Right-click on __IntervalTimerInstruction, and choose New Instance from the pop-up menu. The Edit new instance properties dialog box appears.

  1. In the IntervalBetweenEvents field, type 5000. This means that the event notification will occur every 5000 milliseconds, which is every 5 seconds.
  2. In the TimerId field, type IntervalTimer.
  3. Click OK to create the instance.

Viewing Class Properties

Creating an Event Consumer Instance

Creating an Event Filter Instance

Registering a Consumer for an Event

See Also

Timer Events

__TimerInstruction

__AbsoluteTimerInstruction

__IntervalTimerInstruction