Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/tasks/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,13 @@ export const cancelExampleTask = task({
point the process will be killed.
</Note>

<Warning>
`onCancel` only runs if the run is actively executing. If a run is cancelled while queued or
suspended (e.g. waiting for a token), no machine is spun up and `onCancel` will not be called.
This is a known limitation we're planning to address. Follow the progress on our [feedback
board](https://feedback.trigger.dev/p/call-the-onfailure-hook-for-runs-that-were-canceled-expired).
</Warning>

### `onStart` function (deprecated)

<Info>The `onStart` function was deprecated in v4.1.0. Use `onStartAttempt` instead.</Info>
Expand Down