Background Functions overview

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

Netlify’s Background Functions provide an option for serverless functions that run for up to 15 minutes and don’t need to complete before a visitor can take next steps on your site. 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 TypeScript, JavaScript, or Go.