---
schema_version: "1"
id: 386f22a57953de856cd9ccd526d44c97e2c97459b2ff8503fabf3f056efcea1d
title: setBackground()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/ref-jsapi/ref-jsapi-action-setbackground.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-action-setbackground.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ae1ef50ea1829063dd8b2437356e8131ce51d84eaef33d97983c739e465eaaac
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# setBackground()

Sets the action to run as a background action. This cannot be unset. Background actions are usually long running and lower priority actions. A background action is useful when you want your app to remain responsive to a user while it executes a low priority, long-running action. A rough guideline is to use a background action if it takes more than five seconds for the response to return from the server.

## Signature

`setBackground()`

