Platform SDK: Exchange 2000 Server

Registering an OnTimer Event Sink Binding

[This is preliminary documentation and subject to change.]

You can use the RegEvent.vbs script to register an OnTimer system event sink. When registering for this event, the following script options is used:

cscript RegEvent.vbs Add
                             OnTimer 
                             SinkClass 
                             Scope 
                             StartTime 
                             Interval 
                             [-e ExpiryTime] 
                             [-s ScriptFilePath]
SinkClass
The class identifier (in registry format) or programmatic identifier of the sink COM class. For example, "MySinks.Sink" or {GUID}.
Scope
The fully qualified URL-name of the registration sink item to save to the store. This provides the name of the sink item as well as the event location (scope). For example, file://./backofficestorage/domain/public%20folders/events/EventRegTimerItem1
StartTime
The start time, in Coordinated Universal Time (UCT) for the OnTimer event. For example, "8/4/98 01:50:00 AM "
Interval
The time interval in minutes between each OnTimer event. For example, 1 will cause the OnTimer event to fire each minute.
ExpiryTime
[optional] The end (expiration) time, in Coordinated Universal Time (CUT), for the OnTimer event. For example, "8/4/98 01:50:00 AM "
ScriptFilePath
[optional] The full path to the script file containing sink code. An event scripting host is used to run the script if this value is set. If no script is specified,

Note that timers have scope the same as other events. However no "event" occurs in that location to cause the event to fire (such as a save or delete). Thus the meaning of the scope is nebulous. Scope does however define a specific location for the registration event item, which can affect the security context of the event sink, and guarantees that the event will be deleted if the folder containing the timer event registration is deleted.

See Event Registration and Management for more information on registering and managing event sinks.

Example

Add an OnTimer event to fire every minute for one hour

cscript RegEvent.vbs add ontimer sink1.sink1.1 file://./backofficestorage/mydomain/public%20folders/events/EventRegTimerItem1"8/4/98 01:50:00 AM" 1 -e "8/4/98 02:25:00 AM"

Register for a script sink.

cscript RegEvent.vbs add ontimer ExOleDB.ScriptEventSink file://./backofficestorage/mydomain/mbx/user1/inbox/TimerEventReg2 "09/15/98 02:35:00 PM" 1 "09/15/98 03:35:00 PM" 1 -s http://public.microsoft.com/my_script_location/script2.vbs

See Also

Event Registration and Management