# DL Tasks

As part of WiiConnect24, channels have the ability to register "tasks" permitting occasional download of any sort of file. For example, the Forecast Channel uses download tasks to update its information when idle. Historically the Wii Shop Channel changed its banner via download tasks.

You use a `wiiDLTask` object to interface with WC24 and manage tasks directly from JavaScript.

```javascript
var dlTask = new wiiDlTask();
```

## Members

| Member Name                             | Discussion                                                                                                                                                                                                                                              |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dlTask.addDownloadTask(url, interval)` | Adds a task to be downloaded. `url` should point directly to a file within the [WC24 Content](https://wiibrew.org/wiki/WiiConnect24/WC24_Content#WC24_encryption) format. `interval` is an integer given in minutes specifying when to repeat the task. |
| `dlTask.deleteDownloadTask()`           | Requests that one task is deleted. It is unclear how multiple tasks would be handled, if that is even possible.                                                                                                                                         |
| `dlTask.hasDeletedDLTask()`             | Verifies the amount of registered tasks is equal to 0.                                                                                                                                                                                                  |


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oscwii.org/wii-shop-channel/js/dl-tasks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
