Skip to content

Commit 6bf2880

Browse files
committed
added onCancel note
1 parent 98bf706 commit 6bf2880

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/tasks/overview.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,13 @@ export const cancelExampleTask = task({
535535
point the process will be killed.
536536
</Note>
537537
538+
<Warning>
539+
`onCancel` only runs if the run is actively executing. If a run is cancelled while queued or
540+
suspended (e.g. waiting for a token), no machine is spun up and `onCancel` will not be called.
541+
This is a known limitation we're planning to address. Follow the progress on our [feedback
542+
board](https://feedback.trigger.dev/p/call-the-onfailure-hook-for-runs-that-were-canceled-expired).
543+
</Warning>
544+
538545
### `onStart` function (deprecated)
539546
540547
<Info>The `onStart` function was deprecated in v4.1.0. Use `onStartAttempt` instead.</Info>

0 commit comments

Comments
 (0)