> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-rest-api-guide/v21/api-reference/infrastructure/avd/host-pool/optimization/windows-scheduled-task.md).

# Windows Scheduled Task

## List

> Retrieve Windows Scheduled Task

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/AVD/HostPool/{id}/Optimization/WindowsScheduledTask":{"get":{"tags":["0-Infrastructure/AVD/Host Pool//Optimization"],"summary":"List","description":"Retrieve Windows Scheduled Task","operationId":"237cc859-563a-48b4-b725-d77165fa731c","parameters":[{"name":"id","in":"path","description":"The ID of the optimization setting to retrieve the windows scheduled task.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImageOptimizationWindowsScheduledTask"}}}}},"401":{"description":"Unauthorized","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ImageOptimizationWindowsScheduledTask":{"type":"object","properties":{"task":{"type":"string","description":"<para type=\"synopsis\">Scheduled Task</para>\r\n<para type=\"description\"></para>","nullable":true},"location":{"type":"string","description":"<para type=\"synopsis\">Scheduled Task Location</para>\r\n<para type=\"description\"></para>","nullable":true},"type":{"$ref":"#/components/schemas/OptimizationFileType"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Image Optimization - Windows Scheduled Task</para>\r\n<para type=\"description\"></para>"},"OptimizationFileType":{"enum":[["0 = Folder","1 = Task"]],"type":"string","description":"<para type=\"synopsis\">Whether file type is a folder or a task.</para>\r\n<para type=\"description\"></para>","format":"int32"},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```

{% openapi src="/files/oEgjY6sMA31ZVBC35aoj" path="/api/AVD/HostPool/{id}/Optimization/WindowsScheduledTask" method="post" %}
[swagger 1.json](https://content.gitbook.com/content/jyGAUPrA6XIdGAfHCnJE/blobs/7mKwtvutT7xlWtmCVnxB/swagger%201.json)
{% endopenapi %}

## Delete

> Removes Windows Scheduled Task From Optimization.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/AVD/HostPool/{id}/Optimization/WindowsScheduledTask":{"delete":{"tags":["0-Infrastructure/AVD/Host Pool//Optimization"],"summary":"Delete","description":"Removes Windows Scheduled Task From Optimization.","operationId":"233a7dc6-5759-4a49-85ee-a49dd4d36c35","parameters":[{"name":"id","in":"path","description":"The ID of the optimization setting to remove the windows scheduled task.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Windows Scheduled Task Settings","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/RemoveImageOptimizationWindowsScheduledTask"}}}},"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"RemoveImageOptimizationWindowsScheduledTask":{"required":["location","task"],"type":"object","properties":{"task":{"maxLength":255,"minLength":0,"type":"string","description":"<para type=\"synopsis\">Scheduled Task</para>\r\n<para type=\"description\"></para>","nullable":true},"location":{"maxLength":255,"minLength":0,"type":"string","description":"<para type=\"synopsis\">Scheduled Task Location</para>\r\n<para type=\"description\"></para>","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.parallels.com/landing/ras-rest-api-guide/v21/api-reference/infrastructure/avd/host-pool/optimization/windows-scheduled-task.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
