Skip to main content
Version: Next

SchedulerService.scheduleTask()

Home > @backstage/backend-plugin-api > SchedulerService > scheduleTask

Schedules a task function for recurring runs.

Signature:

scheduleTask(task: SchedulerServiceTaskScheduleDefinition & SchedulerServiceTaskInvocationDefinition): Promise<void>;

Parameters

ParameterTypeDescription
taskSchedulerServiceTaskScheduleDefinition & SchedulerServiceTaskInvocationDefinitionThe 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.