<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Combine",
  "identifier" : "/documentation/Combine/Scheduler",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Combine"
    ],
    "preciseIdentifier" : "s:7Combine9SchedulerP"
  },
  "title" : "Scheduler"
}
-->

# Scheduler

A protocol that defines when and how to execute a closure.

```
protocol Scheduler<SchedulerTimeType>
```

## Overview

You can use a scheduler to execute code as soon as possible, or after a future date.
Individual scheduler implementations use whatever time-keeping system makes sense for them. Schedulers express this as their `SchedulerTimeType`. Since this type conforms to [`SchedulerTimeIntervalConvertible`](/documentation/Combine/SchedulerTimeIntervalConvertible), you can always express these times with the convenience functions like `.milliseconds(500)`. Schedulers can accept options to control how they execute the actions passed to them. These options may control factors like which threads or dispatch queues execute the actions.

## Topics

### Declaring scheduler timekeeping and options

[`SchedulerTimeType`](/documentation/Combine/Scheduler/SchedulerTimeType)

Describes an instant in time for this scheduler.

[`SchedulerOptions`](/documentation/Combine/Scheduler/SchedulerOptions)

A type that defines options accepted by the scheduler.

### Accessing scheduler time properties

[`minimumTolerance`](/documentation/Combine/Scheduler/minimumTolerance)

The minimum tolerance allowed by the scheduler.

[`now`](/documentation/Combine/Scheduler/now)

This scheduler’s definition of the current moment in time.

### Scheduling actions

[`schedule(_:)`](/documentation/Combine/Scheduler/schedule(_:))

Performs the action at the next possible opportunity, without options.

[`schedule(after:_:)`](/documentation/Combine/Scheduler/schedule(after:_:))

Performs the action at some time after the specified date, using the scheduler’s minimum tolerance.

[`schedule(after:interval:_:)`](/documentation/Combine/Scheduler/schedule(after:interval:_:))

Performs the action at some time after the specified date, at the specified frequency, using minimum tolerance possible for this Scheduler.

[`schedule(after:interval:tolerance:_:)`](/documentation/Combine/Scheduler/schedule(after:interval:tolerance:_:))

Performs the action at some time after the specified date, at the specified frequency, taking into account tolerance if possible.

[`schedule(after:interval:tolerance:options:_:)`](/documentation/Combine/Scheduler/schedule(after:interval:tolerance:options:_:))

Performs the action at some time after the specified date, at the specified frequency, optionally taking into account tolerance if possible.

[`schedule(after:tolerance:_:)`](/documentation/Combine/Scheduler/schedule(after:tolerance:_:))

Performs the action at some time after the specified date.

[`schedule(after:tolerance:options:_:)`](/documentation/Combine/Scheduler/schedule(after:tolerance:options:_:))

Performs the action at some time after the specified date.

[`schedule(options:_:)`](/documentation/Combine/Scheduler/schedule(options:_:))

Performs the action at the next possible opportunity.



---

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)