Skip to content
masterclass Buddy

Inngest · Pipe

cancelOn

Use cancelOn to stop a running or sleeping Inngest function when a later event matches the configured cancellation rule. Match the later event to the original trigger with match or if, and optionally limit the wait with timeout.

Last updated

Syntax

inngest.createFunction({ id, triggers, cancelOn: [{ event, match?, if?, timeout? }] }, handler)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • step.waitForEvent()
  • match
  • if
  • timeout
  • inngest/function.cancelled
  • Bulk cancellation

Source: cancelOn | Cancel on Events (SDK v4) - Inngest Docs. Checked 2026-11-03.