Skip to main content

Basic Usage

Signature

Type Safety

The @Job decorator enforces at compile time:
  • The decorated class must extend JobContext
  • The execute() parameter must exactly match the inputSchema type
  • The execute() return type must match the outputSchema type
  • Both inputSchema and outputSchema are required for Jobs

Configuration Options

Required Properties

Optional Properties

RetryConfig

Permission

Examples

Simple Job

Job with Retry

Job with Permissions

Function-Based Alternative

For simpler jobs, use the job() function:

Context Methods

The JobContext base class provides:

Dependency Injection

Logging and Progress

Error Handling

JobContext

Context class details

JobRegistry

Job registry API

Jobs Guide

Jobs documentation

@Workflow

Define workflows