Export (0) Print
Expand All

Defining the Event Provider Schedule

SQL Server 2000

Defining the Event Provider Schedule

The event provider schedule (optional) determines when a scheduled hosted event provider is started for the first time, and how frequently it runs thereafter. Define the schedule in the <Schedule> node of the <HostedProvider> node.

Note  You must exclude the <Schedule> node from the <HostedProvider> node if you do not use it.

The <Schedule> node contains two child elements:

  • <StartTime> (optional)
  • <Interval> (required)

For more information, see <Schedule> Node (<HostedProvider>).

<StartTime> Element

You can use the <StartTime> element to determine how the schedule intervals fall within a 24-hour period. The time value itself is not used, but rather the general time period it specifies. For example:

Your <StartTime> element has a value of 10:00:00, and your <Interval> element is set for 5 minutes. When your application starts, it waits until the first even five-minute interval that occurs, and then runs every 5 minutes thereafter. So, if your application was started at 14:38 GMT, your event provider waits until the first interval that is divisible by 5 (14:40 GMT), then runs at 14:40 GMT, 14:45 GMT, and so on.

You must specify the <StartTime> element value in coordinated universal time (UTC) notation.

Note  You must exclude the <StartTime> element from the <HostedProvider> node if you do not use it. If you do not specify a start time, the event provider starts when your application starts, and then runs at intervals based on when the system came on line. For example, if you have an interval of 5 minutes, and you start your application at 11:22 GMT, your event provider runs at 11:22 GMT, 11:27 GMT, 11:32 GMT, and so on.

For more information, see <StartTime> Element (/HostedProvider/Schedule).

<Interval> Element

Use the <Interval> element to specify how often the event provider should be triggered. For more information, see <Interval> Element.

Example

The following example shows how to create a <Schedule> node. It specifies that the event provider runs at the first five-minute interval after it is started, and then every five minutes thereafter:

<Schedule>
   <StartTime>22:00:00</StartTime>
   <Interval>P0DT00H05M00S</Interval>
</Schedule>

Show:
© 2014 Microsoft