<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BackgroundTasks",
  "identifier" : "/documentation/BackgroundTasks/BGTaskScheduler/Error/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Background Tasks"
    ],
    "preciseIdentifier" : "c:@E@BGTaskSchedulerErrorCode"
  },
  "title" : "BGTaskScheduler.Error.Code"
}
-->

# BGTaskScheduler.Error.Code

An enumeration of the task scheduling errors.

```
enum Code
```

## Topics

### Identifying an error

[`BGTaskScheduler.Error.Code.notPermitted`](/documentation/BackgroundTasks/BGTaskScheduler/Error/Code/notPermitted)

A task scheduling error that indicates the app isn’t permitted to launch the task.

[`BGTaskScheduler.Error.Code.tooManyPendingTaskRequests`](/documentation/BackgroundTasks/BGTaskScheduler/Error/Code/tooManyPendingTaskRequests)

A task scheduling error that indicates there are too many pending tasks of the type requested.

[`BGTaskScheduler.Error.Code.unavailable`](/documentation/BackgroundTasks/BGTaskScheduler/Error/Code/unavailable)

A task scheduling error that indicates the app or extension can’t schedule background work.

[`BGTaskScheduler.Error.Code.immediateRunIneligible`](/documentation/BackgroundTasks/BGTaskScheduler/Error/Code/immediateRunIneligible)

A task scheduling error that indicates a task request didn’t run immediately due to system conditions.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)