定義工作排程器服務所執行的工作。
<xs:element name="Task"
type="taskType"
>
<xs:key name="PrincipalKey">
<xs:selector
xpath="td:Principals/td:Principal"
/>
<xs:field
xpath="@id"
/>
</xs:key>
<xs:keyref name="ContextKeyRef">
<xs:selector
xpath="td:Actions"
/>
<xs:field
xpath="@Context"
/>
</xs:keyref>
<xs:unique name="UniqueId">
<xs:selector
xpath="td:Principals/td:Principal|td:Triggers/td:BootTrigger|td:Triggers/td:RegistrationTrigger|td:Triggers/td:IdleTrigger|td:Triggers/td:TimeTrigger|td:Triggers/td:EventTrigger|td:Triggers/td:LogonTrigger|td:Triggers/td:SessionStateChangeTrigger|td:Triggers/td:CalendarTrigger|td:Actions/td:Exec|td:Actions/td:ComHandler|td:Actions/td:SendEmail"
/>
<xs:field
xpath="@id"
/>
</xs:unique>
</xs:element>
子元素
| 元素 | 類型 | Description |
|---|---|---|
| 動作 | actionsType | 指定工作執行的動作。 |
| 資料 | dataType | 指定與工作相關聯的加法資料,但工作排程器服務未使用。 |
| Principals | principalsType | 指定可用來執行工作的安全性內容。 |
| RegistrationInfo | registrationInfoType | 指定工作的系統管理資訊,例如工作的作者和註冊工作的日期。 |
| 設定 | settingsType | 指定工作排程器用來執行工作的設定。 |
| 觸發程序 | triggersType | 指定啟動工作的觸發程式。 |
備註
如需 C++ 開發,請參閱 ITaskDefinition。
如需腳本開發,請參閱 TaskDefinition。
規格需求
| 需求 | 值 |
|---|---|
| 最低支援的用戶端 |
Windows Vista [僅限傳統型應用程式] |
| 最低支援的伺服器 |
Windows Server 2008 [僅限傳統型應用程式] |