Create and deploy background jobs or scheduled functions right in your existing JavaScript or TypeScript codebase.
Works with:
1import { createFunction } from "inngest"
2import { DemoEventTrigger } from "./types"
3
4export default createFunction<DemoEventTrigger>(
5 "My Great Function",
6 "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" })
4inngest.send({
5 name: "demo/event.name",
6 data: { something: req.body.something }
7})
1import { createFunction } from "inngest"
2import { DemoEventTrigger } from "./types"
3
4export default createFunction<DemoEventTrigger>(
5 "My Great Function",
6 "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
6inngest.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 { createScheduledFunction } from "inngest"
2
3const scheduledTask = () => {
4 return { message: "success" }
5}
6
7export default createScheduledFunction(
8 "A scheduled function",
9 "0 9 * * MON", // any cron expression
10 scheduledTask
11)
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!