1. Define the task using `@trigger.dev/sdk` with an ID and a `run` function.
2. Configure retry policies, including `maxAttempts`, `factor`, `minTimeoutInMs`, and `maxTimeoutInMs`.
3. Implement schema validation using `schemaTask` and `zod` for typed and validated inputs.
4. Trigger the task from backend code using `tasks.trigger` or `tasks.batchTrigger`.
5. Use `triggerAndWait` to wait for the task to complete and retrieve the result.
6. Implement waits using `wait.for`, `wait.forToken`, or `wait.until` for time-based or external approval delays.
7. Configure concurrency and queues using `queue` and the `queue` option in `task` definitions.
8. Handle errors and retries using the `retry` and `catchError` options.