Weeks (monthlyDayOfWeekScheduleType) Element

Specifies the weeks of the month in which the task is run.

<xs:element name="Weeks"
    type="weeksType"
 />

The Weeks element is defined by the monthlyDayOfWeekScheduleType complex type.

Parent element

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

Child elements

Element Type Description
Week weekType Specifies a specific week of the month.

Remarks

For scripting development, the weeks of the month are specified using the MonthlyDOWTrigger.WeeksOfMonth property.

For C++ development, the weeks of the month are specified using the IMonthlyDOWTrigger::WeeksOfMonth property.

When specifying the weeks of the month, use 1-4 to specify the first four weeks of the month or use the string "Last" to indicate the last week regardless of which week it is.

Examples

The following XML defines a monthly day-of-week calendar that starts the task on Monday of the first week for each month of the year.

<ScheduleByMonthDayOfWeek>
    <Weeks>
        <Week>1</Week>
    </Weeks>
    <DaysOfWeek>
        <Monday/>
    </DaysOfWeek>
    <Months>
        <January/>
        <February/>
        <March/>
        <April/>
        <May/>
        <June/>
        <July/>
        <August/>
        <September/>
        <October/>
        <November/>
        <December/>
    <Months>
 </ScheduleByMonthDayOfWeek>

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