<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceActivity",
  "identifier" : "/documentation/DeviceActivity/DeviceActivitySchedule",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Device Activity"
    ],
    "preciseIdentifier" : "s:14DeviceActivity0aB8ScheduleV"
  },
  "title" : "DeviceActivitySchedule"
}
-->

# DeviceActivitySchedule

A calendar-based schedule for when to monitor a device’s activity.

```
struct DeviceActivitySchedule
```

## Overview

Create a new schedule using `DateComponents` that allows your app to monitor the person’s device activity during a period of time.
You can set a schedule for your app to monitor on a regularly occuring basis.
You can create a warning time that the system uses to provide your app extension with
callbacks whenever a schedule is about to start or end, or when an event is close to reaching its threshold.

## Topics

### Creating a Schedule

[`init(intervalStart:intervalEnd:repeats:warningTime:)`](/documentation/DeviceActivity/DeviceActivitySchedule/init(intervalStart:intervalEnd:repeats:warningTime:))

Creates a new schedule.

[`intervalEnd`](/documentation/DeviceActivity/DeviceActivitySchedule/intervalEnd)

The date components that represent the end time for a schedule’s interval.

[`intervalStart`](/documentation/DeviceActivity/DeviceActivitySchedule/intervalStart)

The date components that represent the start time for a schedule’s interval.

[`nextInterval`](/documentation/DeviceActivity/DeviceActivitySchedule/nextInterval)

The schedule’s next interval or the current interval if one is ongoing.

[`repeats`](/documentation/DeviceActivity/DeviceActivitySchedule/repeats)

A Boolean value that indicates whether the schedule recurs.

[`warningTime`](/documentation/DeviceActivity/DeviceActivitySchedule/warningTime)

Optional components that generate a warning prior to regularly scheduled events.



---

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)