DaysOfMonth (monthlyScheduleType) Element

Specifies the days of the month during which the task runs.

<xs:element name="DaysOfMonth"
    type="daysOfMonthType"
 />

The DaysOfMonth element is defined by the monthlyScheduleType complex type.

Parent element

Element Derived from Description
ScheduleByMonth monthlyDayOfWeekScheduleType Specifies a trigger that starts a job for a monthly day-of-week schedule.

Child elements

Element Type Description
Day dayOfMonthType Specifies a day of the month during which the task runs.

Remarks

For script development, the days of the month for the schedule are specified using the MonthlyTrigger.DaysOfMonth property.

For C++ development, the days of the month for the schedule are specified using the IMonthlyTrigger::DaysOfMonth property.

The child element must be repeated for each day of the month the task is to run.

Examples

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

<CalendarTrigger>
    <StartBoundary>2005-01-01T08:00:00</StartBoundary>
    <EndBoundary>2007-01-01T00:00:00</EndBoundary>
    <ScheduleByMonth>
        <DaysOfMonth>
            <Day>1</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