Background Functions overview

This feature is in BETA and may not be available on all plans.

Netlify’s Background Functions allow you to set up serverless function processes that run longer than 10 seconds and up to 15 minutes. For tasks like batch processing, scraping, and slower API workflow execution, they may be a better fit than synchronous functions.

These longer-running functions are processed as background tasks using asynchronous invocation. When a function is invoked asynchronously, there is an initial 202 success response. If function execution returns an error, an execution retry happens after one minute. If it fails again, another retry happens two minutes later. When a background function is successfully executed, you generally pass the result to a destination other than the originating client.

Like all Netlify Functions, background functions are version-controlled, built, and deployed along with the rest of your Netlify site. You can configure and monitor them along with your other functions. You can build background functions in JavaScript, TypeScript, or Go.