Inngest Functions
Inngest functions are durable, retriable units of background logic that run on your own compute and are triggered by events, cron schedules, or webhooks. Use them for background jobs, scheduled work, and multi-step workflows that need automatic retries, step-level state, and observability without adding a queue or workflow engine.
You write standard TypeScript, Python, or Go code, then expose functions with serve() or Connect so Inngest can invoke and coordinate runs from the platform.
What are Inngest functions?
An Inngest function is a regular function wrapped with Inngest trigger and execution metadata. Inngest starts a run when a matching event, schedule, or webhook arrives, then records each step so failed work can retry from the last successful checkpoint instead of restarting from scratch.
At a high level, an Inngest function has three core parts:
Triggers
A list of Events, Cron schedules or webhook events that trigger Function runs.
Flow Control
Control how Function runs get distributed in time with Concurrency, Throttling and more.
Steps
Transform your Inngest Function into a workflow with retriable checkpoints.
inngest.createFunction({
id: "sync-systems",
// A Function is triggered by events
triggers: { event: "auto/sync.request" },
// Easily add Throttling with Flow Control
throttle: { limit: 3, period: "1min"},
},
async ({ step }) => {
// step is retried if it throws an error
const data = await step.run("get-data", async () => {
return getDataFromExternalSource();
});
// Steps can reuse data from previous ones
await step.run("save-data", async () => {
return db.syncs.insertOne(data);
});
}
);
Using Inngest Functions
Start using Inngest Functions by using the pattern that fits your use case:
Background jobs
Run long-running tasks out of the critical path of a request.
Delayed Functions
Schedule Functions that run in the future.
Cron Functions
Build Inngest Functions as CRONs.
Workflows
Start creating workflows by leveraging Inngest Function Steps.
Learn more about Functions and Steps
Functions and Steps are powered by Inngest's Durable Execution Engine. Learn about its inner working by reading the following guides:
How Functions are executed
A deep dive into Inngest's Durable Execution Engine with a step-by-step workflow run example.
Thinking in Steps
Discover by example how steps enable more reliable and flexible functions with step-level error handling, conditional steps and waits.