Export (0) Print
Expand All

2.4.2.11 Triggers

An array of zero or more triggers follows the Trigger Count field. All triggers share the same format.


0

1

2

3

4

5

6

7

8

9
1
0

1

2

3

4

5

6

7

8

9
2
0

1

2

3

4

5

6

7

8

9
3
0

1

Trigger Size

Reserved1

Begin Year

Begin Month

Begin Day

End Year

End Month

End Day

Start Hour

Start Minute

Minutes Duration

Minutes Interval

Flags

Trigger Type

TriggerSpecific0

TriggerSpecific1

TriggerSpecific2

Padding

Reserved2

Reserved3

Trigger Size (2 bytes): Set to 0x0030. When creating a job, the value SHOULD be ignored upon receipt.

 

Reserved1 (2 bytes): This field is ignored when read in from the file and is set to 0.

 

Begin Year (2 bytes): This field contains the first date this trigger is to fire. Begin Year SHOULD be in the range of 1601 to 30827.<16>

Begin Month (2 bytes): This field contains the first date this trigger is to fire. Begin Month SHOULD be in the range of 1 to 12. <17>

Begin Day (2 bytes): This field contains the first date this trigger fires. Begin Day SHOULD be in the range of 1 to the number of days in the month specified by the Begin Month field. <18>

End Year (2 bytes): These fields are ignored if the TASK_TRIGGER_FLAG_HAS_END_DATE bit is not set in the Flags field. Otherwise, these fields are set to the last date this trigger fires. End Year SHOULD be in the range of 1601 to 30827. <19>

End Month (2 bytes): These fields are ignored if the TASK_TRIGGER_FLAG_HAS_END_DATE bit is not set in the Flags field. Otherwise, these fields are set to the last date this trigger is to fire. End Month SHOULD be in the range of 1 to 12. <20>

End Day (2 bytes): These fields are ignored if the TASK_TRIGGER_FLAG_HAS_END_DATE bit is not set in the Flags field. Otherwise, these fields are set to the last date this trigger is to fire. End Day SHOULD be in the range of 1 to the number of days in the month specified by the End Month field.<21>

Start Hour (2 bytes): This field is set to the hour of the day when this trigger fires. Start Hour is in the range 0 to 23.

Start Minute (2 bytes): This field is set to the minute of the hour when this trigger is to fire. Start Minute is in the range 0 to 59.

Minutes Duration (4 bytes): This field contains a value in minutes, in the range 0x00000000 to 0xFFFFFFFF.<22>

For example, if Minutes Duration is 60, and Minutes Interval is 15, then if started at 1:00, the task runs every 15 minutes for the next 60 minutes (five times: at 1:00, 1:15, 1:30, 1:45, and 2:00.)

Minutes Interval (4 bytes): This field contains a value in minutes, in the range 0x00000000 to 0xFFFFFFFF. Minutes Interval indicates the time period between repeated trigger firings.<23>

Flags (4 bytes): This field contains zero or more bit flags. All bits not defined in the following table are to be set to zero and ignored upon receipt. The bit field is structured as follows:


0

1

2

3

4

5

6

7

8

9
1
0

1

2

3

4

5

6

7

8

9
2
0

1

2

3

4

5

6

7

8

9
3
0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

D

K

E

Task Trigger Flags

Value Description

E

TASK_TRIGGER_FLAG_HAS_END_DATE

If set to 1, specifies that the task can stop at some point in time.

K

TASK_TRIGGER_FLAG_KILL_AT_DURATION_END

If set to 1, specifies that the task can be stopped at the end of the repetition period.

D

TASK_TRIGGER_FLAG_DISABLED

If set to 1, specifies that the trigger is disabled.

Trigger Type (4 bytes): Trigger type, as specified in section 2.4.2.11.1.

TriggerSpecific0 (2 bytes): This field is set to values specific to each trigger type.

TriggerSpecific1 (2 bytes): This field is set to values specific to each trigger type.

TriggerSpecific2 (2 bytes): This field is set to values specific to each trigger type.

Padding (2 bytes): MUST be set to zero when sent and MUST be ignored on receipt.

Reserved2 (2 bytes): MUST be set to zero when sent and MUST be ignored on receipt.

Reserved3 (2 bytes): MUST be set to zero when sent and MUST be ignored on receipt.

 
Show:
© 2015 Microsoft