Skip to main content

PluginTaskScheduler.scheduleTask()

Home > @backstage/backend-tasks > PluginTaskScheduler > scheduleTask

Schedules a task function for recurring runs.

Signature:

scheduleTask(task: TaskScheduleDefinition & TaskInvocationDefinition): Promise<void>;

Parameters

ParameterTypeDescription
taskTaskScheduleDefinition & TaskInvocationDefinitionThe task definition

Returns:

Promise<void>

Remarks

The scope task field controls whether to use coordinated exclusive invocation across workers, or to just coordinate within the current worker.

This convenience method performs both the scheduling and invocation in one go.