> ## Documentation Index
> Fetch the complete documentation index at: https://usefused.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tasks

> Create retryable application work, defer it from tools, and run it on a schedule.

Harnest Tasks run application-owned work outside the model tool call that requested it. Put each public `@task` callable under root `tasks/`; Harnest discovers it by filename and adds the queue runtime only when a task exists.

| Need                                                           | Use                                                                    |
| -------------------------------------------------------------- | ---------------------------------------------------------------------- |
| Retryable work that a tool or trusted service starts           | `await task.defer(...)`                                                |
| Wait for queued work from an agent invocation                  | Async `@tool(durable=True)`                                            |
| Start work at a fixed UTC schedule                             | A matching declaration under [`cron/`](/docs/harnest/build/scheduled-tasks) |
| Let managed code create or control a user's recurring schedule | [Dynamic schedules](/docs/harnest/build/dynamic-schedules)                  |
| Ordinary in-process reuse                                      | Call the decorated task directly                                       |

<CardGroup cols={3}>
  <Card title="Create a Task" icon="list-check" href="/docs/harnest/build/queued-tasks">
    Define, defer, inspect, cancel, and await a folder-discovered Task.
  </Card>

  <Card title="Cron schedules" icon="calendar-clock" href="/docs/harnest/build/scheduled-tasks">
    Declare fixed UTC schedules in `cron/`.
  </Card>

  <Card title="Dynamic schedules" icon="calendar-plus" href="/docs/harnest/build/dynamic-schedules">
    Create and control user-owned schedules from managed code.
  </Card>
</CardGroup>

<Card title="Durable execution" icon="rotate" href="/docs/harnest/runtime/durable-execution">
  Understand suspension, replica recovery, and the boundary between a Task and the framework run waiting for it.
</Card>
