Skip to main content

Interface: PluginBackgroundTask

A deferrable task that can run without an open interactive application session.

Properties

id

id: string

Stable identifier, unique inside the plugin manifest.


action

action: string

Plugin action passed to onAction(params, actionId).


intervalMinutes

intervalMinutes: number

Repeat interval in minutes. Android's minimum is 15 minutes.


freshnessMinutes?

optional freshnessMinutes?: number

Skip periodic delivery while the previous successful result is newer than this many minutes.


flexMinutes?

optional flexMinutes?: number

Optional flexible execution window at the end of each interval.


runOnInstall?

optional runOnInstall?: boolean

Schedule an immediate one-time run when this plugin/version is installed.


runOnConfigChange?

optional runOnConfigChange?: boolean

Schedule an immediate one-time run after the user saves plugin configuration.


sliceDurationMinutes?

optional sliceDurationMinutes?: number

Cooperative slice budget. The plugin should checkpoint and request a continuation before it expires.


constraints?

optional constraints?: BackgroundTaskConstraints

Conditions that must be satisfied before automatic delivery.