Skills Development Defining and Managing Background API Tasks

Defining and Managing Background API Tasks

v20260424
webiny-api-tasks-catalog
This module provides core abstractions for handling long-running, asynchronous background tasks within an API context. It introduces `TaskDefinition` to define the complete lifecycle and hooks for a background task, and `TaskService` to programmatically trigger and manage these operations. It is essential for backend development requiring robust, non-instantaneous processing.
Get Skill
72 downloads
Overview

api/tasks

How to Use

  1. Find the abstraction you need below
  2. You MUST read the source file to get the exact interface and types!
  3. Import: import { Name } from "<importPath>";
  4. See webiny-use-case-pattern or webiny-event-handler-pattern skills for implementation patterns

Abstractions


Name: TaskDefinition Import: import { TaskDefinition } from "webiny/api/tasks" Source: @webiny/api-core/features/task/TaskDefinition/index.ts Description: Define a long-running background task with lifecycle hooks.


Name: TaskService Import: import { TaskService } from "webiny/api/tasks" Source: @webiny/api-core/features/task/TaskService/index.ts Description: Trigger and manage long-running background tasks.


Info
Category Development
Name webiny-api-tasks-catalog
Version v20260424
Size 886B
Updated At 2026-04-28
Language