---
title: DeviceActivitySchedule
framework: Device Activity
role: symbol
role_heading: Structure
platforms: [iOS 15.0+, iPadOS 15.0+, Mac Catalyst 15.0+]
path: deviceactivity/deviceactivityschedule
---

# DeviceActivitySchedule

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

## Declaration

```swift
struct DeviceActivitySchedule
```

## Overview

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:)](deviceactivity/deviceactivityschedule/init(intervalstart:intervalend:repeats:warningtime:).md)
- [intervalEnd](deviceactivity/deviceactivityschedule/intervalend.md)
- [intervalStart](deviceactivity/deviceactivityschedule/intervalstart.md)
- [nextInterval](deviceactivity/deviceactivityschedule/nextinterval.md)
- [repeats](deviceactivity/deviceactivityschedule/repeats.md)
- [warningTime](deviceactivity/deviceactivityschedule/warningtime.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)

## See Also

### Manage activities

- [DeviceActivityEvent](deviceactivity/deviceactivityevent.md)
- [DeviceActivityName](deviceactivity/deviceactivityname.md)
- [DeviceActivityCenter](deviceactivity/deviceactivitycenter.md)
