SchedulerService.scheduleTask()
Home > @backstage/backend-plugin-api
> SchedulerService
> scheduleTask
Schedules a task function for recurring runs.
Signature:
scheduleTask(task: SchedulerServiceTaskScheduleDefinition & SchedulerServiceTaskInvocationDefinition): Promise<void>;
Parameters
Parameter |
Type |
Description |
---|---|---|
task |
SchedulerServiceTaskScheduleDefinition & SchedulerServiceTaskInvocationDefinition |
The task definition |
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.