Skip to content

Latest commit

 

History

History
118 lines (73 loc) · 3.64 KB

taskschedulerschema-weeks-monthlydayofweekscheduletype-element.md

File metadata and controls

118 lines (73 loc) · 3.64 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location
Weeks (monthlyDayOfWeekScheduleType) Element
Specifies the weeks of the month in which the task is run.
c126d1e2-6e60-4067-9fc2-86c9522cce5d
Weeks element Task Scheduler
apiref
Weeks
Schema
reference
05/31/2018

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