Skip to content
Scheduled work

Scheduled work

The scheduled capability lets an App register work for a future wake. An App can create registrations at runtime only when the capability is declared in its manifest and enabled through consent.

Schedule and execution

Schedules support three precision modes:

  • Exact instant — request a specific point in time (for example for a planned message sending or publishing action)
  • Soft or windowed — request a wake within a time window, allowing the Host to choose the exact moment (for example for non-time-critical cleanup tasks)
  • Day-only — request a wake associated with a calendar date, without specifying a time of day (for example daily cleaning tasks)

There are additionally three repeating modes:

  • Once — defines point in time
  • Interval — (like a cron) Defines on what days (and times) this should be scheduled. Maybe provide an optional end date.
  • Repeat — defines point in time and after the call finished it waits a defined duration then calls the app again until the defined number of calls.

The Host stores and evaluates scheduled times. Each wake runs in the context of one account and uses that account’s effective Grants. If a scheduled task takes longer than expected, the Host won’t start a second run of that same schedule before the first run finishes. If the Host is unavailable at a scheduled time, it performs only bounded catch-up work after recovery.

The Host removes an App’s registrations when that App is uninstalled.