다음을 통해 공유


ScheduledRule Element (ADF)

Contains elements that define a single subscription scheduled rule.

구문

<SubscriptionClasses>
    <SubscriptionClass>
        ...
        <ScheduledRules>
            <ScheduledRule>

Element Characteristics

Characteristic Description

Data type

None.

Default value

None.

Occurrence

Required once or more per ScheduledRules element.

Updates

Can be added and deleted when updating the application.

Element Relationships

Relationship Elements

Parent element

ScheduledRules Element (ADF)

Child elements

RuleName Element for ScheduledRule (ADF)

Action Element for ScheduledRule (ADF)

OR

ConditionAction Element (ADF)

ActionTimeout Element for ScheduledRule (ADF)

주의

Scheduled rules contain the notification generation rules for scheduled subscriptions. Microsoft SQL Server 2005 Notification Services runs the scheduled rule in each quantum that has scheduled subscriptions due to be processed.

The notification generation rule typically joins event data from an event chronicle table with the subscription information and generates a notifications based on matches.

A ScheduledRule element can contain either an Action element or a ConditionAction element, not both.

The following example shows how to define a subscription schedule rule, named StockSubScheduledRule, that contains an Action. This rule creates notifications for scheduled subscriptions, and also loads notification data into a subscription chronicle for use in data mining on subscription trends. This ActionTimeout value of P0DT00H00M45S gives the rule 45 seconds to complete successfully.

<ScheduledRule>
    <RuleName>StockSubScheduledRule</RuleName>
    <Action>
    -- Generate notifications from the event chronicle
    INSERT INTO ScheduledNotifications
    ( SubscriberId, DeviceName, SubscriberLocale,
      StockSymbol, StockPrice )
    SELECT S.SubscriberId, S.DeviceName, 
       S.SubscriberLocale, C.StockSymbol, C.StockPrice
    FROM StockSubscriptions S JOIN StockEventChron C
    ON S.StockSymbol = C.StockSymbol 
    WHERE S.StockTriggerPrice &lt;= C.StockHighPrice 
    GROUP BY S.StockSymbol, C.StockHighPrice
    -- Maintain the subscription chronicle
    INSERT StockSubscriptionChron
    (SubscriberId, StockSymbol, StockPrice)
    SELECT S.SubscriberId, S.StockSymbol, C.StockHighPrice
    FROM StockSubscriptions S JOIN StockEventChron C
    ON S.StockSymbol = C.StockSymbol
    </Action>
    <ActionTimeout>P0DT00H00M45S</ActionTimeout>
</ScheduledRule>

참고 항목

참조

Application Definition File Reference

관련 자료

예약 규칙 정의
인스턴스 및 응용 프로그램 업데이트

도움말 및 정보

SQL Server 2005 지원 받기