Create and deploy background jobs or scheduled functions right in your existing JavaScript or TypeScript codebase.
Works with:
1import { inngest } from "./client";
2import { DemoEventTrigger } from "./types"
3
4export default inngest.createFunction<DemoEventTrigger>(
5 { name: "My Great Function" },
6 { event: "demo/event.trigger" },
7 async ({ event }) => {
8 return { message: "success" }
9 }
10)
1import { Inngest } from "inngest"
2import { Events } from "../../__generated__/inngest"
3const inngest = new Inngest<Events>({ name: "My App" })
4await inngest.send({
5 name: "demo/event.name",
6 data: { something: req.body.something }
7})
1import { inngest } from "./client";
2import { DemoEventTrigger } from "./types"
3
4export default inngest.createFunction<DemoEventTrigger>(
5 { name: "My Great Function" },
6 { event: "demo/event.trigger" },
7 async ({ event }) => {
8 return { message: "success" }
9 }
10)
Easily define functions that run in response to events. Background jobs, scheduled tasks, webhooks are all made easy with Inngest's SDK.
1import { Inngest } from "inngest"
2import { Events } from "../../__generated__/inngest"
3
4const inngest = new Inngest<Events>({ name: "My App" })
5
6await inngest.send({
7 name: "demo/event.name",
8 data: { something: req.body.something }
9})
Send events with our SDK to trigger background jobs and move longer running code out of the critical path of an API request.
1import { inngest } from "./client";
2
3export default inngest.createFunction(
4 { name: "A scheduled function" },
5 { cron: "0 9 * * MON" }, // any cron expression
6 async () => {
7 // Do work regulary at 9AM monday...
8 return { message: "success" };
9 }
10)
Run your code on a schedule using basic cron expressions. Cron jobs made simple with observability & logs.
1import { Inngest } from "inngest"
2import { serve } from "inngest/next"
3import { Events } from "../../__generated__/inngest"
4
5import { myGreatFunction } from "../../myGreatFunction"
6import { scheduledTask } from "../../scheduledTask"
7
8const inngest = new Inngest<Events>({ name: "My App" })
9
10export default serve(inngest, [
11 myGreatFunction,
12 scheduledTask
13])
Inngest can remotely run your background tasks via secure HTTP handler. You keep your existing deployment workflow and we'll call your code where it is.
What we've built and what's up next:
Type
generation and sync (docs)Future: Additional platform support (AWS Lambda, Supabase, Deno), additional framework support (Remix, RedwoodJS), testing APIs
You can try the SDK today! Dive into our docs to get started
Join our Discord community to share feedback, get updates and have a direct line to shaping the future of the SDK!