IMonthlyDOWTrigger::put_WeeksOfMonth method (taskschd.h)

Gets or sets the weeks of the month during which the task runs.

This property is read/write.

Syntax

HRESULT put_WeeksOfMonth(
  short weeks
);

Parameters

weeks

Return value

None

Remarks

The following table shows the mapping of the bitwise mask used by this property. Note that you can explicitly specify the last week of the month, regardless of what week it is, by specifying 0X10 (16).

Week Hex value Decimal value
First 0X01 1
Second 0x02 2
Third 0X04 4
Fourth 0X08 8
Last 0X10 16
 

When reading or writing XML for a task, the weeks of the month of a monthly day-of-week calendar are specified by the Weeks element of the Task Scheduler schema.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header taskschd.h
Library Taskschd.lib
DLL Taskschd.dll

See also

IMonthlyDOWTrigger

Task Scheduler