Muokkaa

Jaa


ScheduleByMonth (calendarTriggerType) Element

Specifies a monthly schedule. For example, the task starts at 8:00 AM on specific days of the month on specific months.

<xs:element name="ScheduleByMonth"
    type="monthlyScheduleType"
 />

The ScheduleByMonth element is defined by the calendarTriggerType complex type.

Parent element

Element Derived from Description
CalendarTrigger calendarTriggerType Specifies a daily, weekly, monthly, or a monthly day-of-the-week (DOW) trigger.

Child elements

Element Type Description
DaysOfMonth (monthlyScheduleType) daysOfMonthType Specifies the days of the month during which the task runs.
Months (monthlyScheduleType) monthsType Specifies the months of the year during which the task runs.

Remarks

The time of day that the task is started is set by the StartBoundary element.

For script development, a monthly trigger is specified using the MonthlyTrigger object.

For C++ development, a monthly trigger is specified using the IMonthlyTrigger interface.

The child elements listed below are defined by the monthlyScheduleType complex element types.

Examples

The following XML defines a monthly calendar trigger that starts a task ( at 8:00 AM) on the 1st and 15th day of every month of the year.

<CalendarTrigger>
    <StartBoundary>2005-01-01T08:00:00</StartBoundary>
    <EndBounadry>2007-01-01T00:00:00</EndBoundary>
    <ScheduleByMonth>
        <DaysOfMonth>
            <Day>1</Day>
            <Day>15</Day>
        </DaysOfMonth>
        <Months>
            <January/>
            <February/>
            <March/>
            <April/>
            <May/>
            <June/>
            <July/>
            <August/>
            <September/>
            <October/>
            <November/>
            <December/>
        </Months>
    </ScheduleByMonth>
</CalendarTrigger>

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]

See also

Task Scheduler Schema Elements

Task Scheduler