<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/run-next-js-functions-in-the-background-with-events-and-schedules-on-vercel-and-netlify-jxkfypfk2" -->

---
title: Run Next.js functions in the background with events and...
description: A tutorial demonstrates how to run background jobs and scheduled tasks in Next.js applications deployed to Vercel or Netlify using Inngest, without...
canonical: https://daily.dev/posts/run-next-js-functions-in-the-background-with-events-and-schedules-on-vercel-and-netlify-jxkfypfk2
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Run Next.js functions in the background with events and schedules on Vercel and Netlify | daily.dev
og:description: A tutorial demonstrates how to run background jobs and scheduled tasks in Next.js applications deployed to Vercel or Netlify using Inngest, without...
og:url: https://daily.dev/posts/run-next-js-functions-in-the-background-with-events-and-schedules-on-vercel-and-netlify-jxkfypfk2
og:image: https://api.daily.dev/og/posts/jXkFyPfk2.png
og:image:alt: Run Next.js functions in the background with events and schedules on Vercel and Netlify
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Next.js functions in the background with events and schedules on Vercel and Netlify

**[Inngest Blog](https://daily.dev/sources/inngest)** · 8 min read · 0 upvotes · 0 comments

## Summary

A tutorial demonstrates how to run background jobs and scheduled tasks in Next.js applications deployed to Vercel or Netlify using Inngest, without provisioning additional infrastructure like message queues or dedicated schedulers. It walks through defining a cron-scheduled function for sending weekly digest emails and an event-triggered function for sending welcome emails on user signup, using the Inngest SDK's createFunction and serve handlers. The Inngest platform calls the app's serverless functions via HTTP based on schedules or emitted events, and provides logs, audit trails, and observability for these background processes out of the box.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.inngest.com/blog/run-nextjs-functions-in-the-background>

## Questions this post answers

### How do I run a cron job in a Next.js app deployed on Vercel without setting up a separate infrastructure?

Use the Inngest SDK's createFunction with a cron expression, then expose it through the serve handler from inngest/next in an API route such as pages/api/inngest.js. Inngest calls the function via HTTP on the specified schedule (for example "0 12 * * 1" for every Monday at noon), requiring only an INNGEST_SIGNING_KEY environment variable and no extra deployment infrastructure.

_daily.dev surfaces practical patterns like this for developers adding background jobs to serverless Next.js apps._

### How do I trigger a background function in Next.js when a user signs up?

Send an event object (like {name: "user.signup", data: {...}, user: {email}}) from the API route using inngest.send() with an INNGEST_EVENT_KEY, then define a separate function with inngest.createFunction bound to that event name via {event: "user.signup"}. Inngest logs the event and asynchronously dispatches it to the registered function, decoupling the signup request from slower tasks like sending a welcome email.

_Developers wiring event-driven background jobs into Next.js apps can find similar walkthroughs on daily.dev._

## Similar posts on daily.dev

- [Automating Complex Workflow in Your Next.js App with Inngest](https://daily.dev/posts/automating-complex-workflow-in-your-next-js-app-with-inngest-z21aksfdw) · Telerik · 2 upvotes · 0 comments
- [Drain Payload’s Schedule Queue on Serverless, End to End](https://daily.dev/posts/drain-payload-s-schedule-queue-on-serverless-end-to-end-fvn0xqsmt) · Medium · 0 upvotes · 0 comments
- [Vercel Workflows tutorial: build a durable background job](https://daily.dev/posts/vercel-workflows-tutorial-build-a-durable-background-job-27npsfaqy) · Flavio Copes · 0 upvotes · 1 comments

---

Tags: [#inngest](https://daily.dev/tags/inngest), [#nextjs](https://daily.dev/tags/nextjs), [#vercel](https://daily.dev/tags/vercel)

[View this post on daily.dev](https://daily.dev/posts/run-next-js-functions-in-the-background-with-events-and-schedules-on-vercel-and-netlify-jxkfypfk2)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Run Next.js functions in the background with events and schedules on Vercel and Netlify","url":"https://daily.dev/posts/run-next-js-functions-in-the-background-with-events-and-schedules-on-vercel-and-netlify-jxkfypfk2","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/run-next-js-functions-in-the-background-with-events-and-schedules-on-vercel-and-netlify-jxkfypfk2"},"datePublished":"2026-09-13T19:57:35.486Z","dateModified":"2026-10-15T02:22:32.961Z","description":"A tutorial demonstrates how to run background jobs and scheduled tasks in Next.js applications deployed to Vercel or Netlify using Inngest, without...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/262636807e96211e006f99eea8b961c2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/262636807e96211e006f99eea8b961c2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inngest Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inngest Blog","logo":"https://media.daily.dev/image/upload/s--ieZKUa5y--/c_limit,w_256/f_auto,q_auto/v1789329423/logos/inngest?_a=BAMAMicg0","url":"https://daily.dev/sources/inngest"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/run-next-js-functions-in-the-background-with-events-and-schedules-on-vercel-and-netlify-jxkfypfk2","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"inngest,nextjs,vercel","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inngest Blog","item":"https://daily.dev/sources/inngest"},{"@type":"ListItem","position":3,"name":"Run Next.js functions in the background with events and schedules on Vercel and Netlify"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/run-next-js-functions-in-the-background-with-events-and-schedules-on-vercel-and-netlify-jxkfypfk2#faq","mainEntity":[{"@type":"Question","name":"How do I run a cron job in a Next.js app deployed on Vercel without setting up a separate infrastructure?","acceptedAnswer":{"@type":"Answer","text":"Use the Inngest SDK's createFunction with a cron expression, then expose it through the serve handler from inngest/next in an API route such as pages/api/inngest.js. Inngest calls the function via HTTP on the specified schedule (for example \"0 12 * * 1\" for every Monday at noon), requiring only an INNGEST_SIGNING_KEY environment variable and no extra deployment infrastructure. daily.dev surfaces practical patterns like this for developers adding background jobs to serverless Next.js apps."}},{"@type":"Question","name":"How do I trigger a background function in Next.js when a user signs up?","acceptedAnswer":{"@type":"Answer","text":"Send an event object (like {name: \"user.signup\", data: {...}, user: {email}}) from the API route using inngest.send() with an INNGEST_EVENT_KEY, then define a separate function with inngest.createFunction bound to that event name via {event: \"user.signup\"}. Inngest logs the event and asynchronously dispatches it to the registered function, decoupling the signup request from slower tasks like sending a welcome email. Developers wiring event-driven background jobs into Next.js apps can find similar walkthroughs on daily.dev."}}]}
```

