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

# Writing tasks: Overview

> Tasks are the core of Trigger.dev. They are long-running processes that are triggered by events.

Before digging deeper into the details of writing tasks, you should read the [fundamentals of tasks](https://trigger.dev/docs/tasks/overview.md) to understand what tasks are and how they work.

## Writing tasks

| Topic | Description |
| :- | :- |
| [Logging](https://trigger.dev/docs/logging.md) | View and send logs and traces from your tasks. |
| [Errors & retrying](https://trigger.dev/docs/errors-retrying.md) | How to deal with errors and write reliable tasks. |
| [Wait](https://trigger.dev/docs/wait.md) | Wait for periods of time or for external events to occur before continuing. |
| [Queues](https://trigger.dev/docs/queues.md) | Control the order your runs execute in. |
| [Concurrency](https://trigger.dev/docs/concurrency.md) | Limit how many runs execute at once: per task, per tenant, or shared across tasks. |
| [Realtime notifications](https://trigger.dev/docs/realtime/overview.md) | Send realtime notifications from your task that you can subscribe to from your backend or frontend. |
| [Versioning](https://trigger.dev/docs/versioning.md) | How versioning works. |
| [Machines](https://trigger.dev/docs/machines.md) | Configure the CPU and RAM of the machine your task runs on |
| [Idempotency](https://trigger.dev/docs/idempotency.md) | Protect against mutations happening twice. |
| [Replaying](https://trigger.dev/docs/replaying.md) | You can replay a single task or many at once with a new version of your code. |
| [Max duration](https://trigger.dev/docs/runs/max-duration.md) | Set a maximum duration for your task to run. |
| [Tags](https://trigger.dev/docs/tags.md) | Tags allow you to easily filter runs in the dashboard and when using the SDK. |
| [Metadata](https://trigger.dev/docs/runs/metadata.md) | Attach a small amount of data to a run and update it as the run progresses. |
| [Usage](https://trigger.dev/docs/run-usage.md) | Get compute duration and cost from inside a run, or for a specific block of code. |
| [Context](https://trigger.dev/docs/context.md) | Access the context of the task run. |
| [Bulk actions](https://trigger.dev/docs/bulk-actions.md) | Run actions on many task runs at once. |
| [Priority](https://trigger.dev/docs/runs/priority.md) | Specify a priority when triggering a task. |
| [Hidden tasks](https://trigger.dev/docs/hidden-tasks.md) | Create tasks that are not exported from your trigger files but can still be executed. |

## Our library of examples, guides and projects

> [card] [Walkthrough guides](https://trigger.dev/docs/guides/introduction.md)
>
> Detailed guides for setting up Trigger.dev with popular frameworks and services, including
> Next.js, Remix, Supabase, Stripe and more.

> [card] [Example tasks](https://trigger.dev/docs/guides/introduction.md#example-tasks)
>
> Task code you can copy and paste to use in your own projects, including OpenAI, Vercel AI SDK,
> Deepgram, FFmpeg, Puppeteer, Stripe, Supabase and more.

> [card] [Webhook guides](https://trigger.dev/docs/guides/frameworks/webhooks-guides-overview.md)
>
> Learn how to trigger tasks from webhooks, including Next.js, Remix, Supabase and Stripe and
> more.

> [card] [Example projects](https://trigger.dev/docs/guides/introduction.md#example-projects)
>
> Full-stack projects demonstrating how to use Trigger.dev. Fork them in GitHub as a starting
> point for your own projects.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.