Skip to content

API Reference

Welcome to the comprehensive Cronflow API reference. This documentation covers all the classes, methods, and types available in the Cronflow library, organized by functionality.

API Structure

The Cronflow API is organized into the following categories:

Core Functions

Workflow Instance Methods

Reference

Quick Start

typescript
import { cronflow } from 'cronflow';

// Define a workflow
const workflow = cronflow.define({
  id: 'my-workflow',
  name: 'My Workflow',
});

// Add steps
workflow
  .step('fetch-data', async ctx => {
    return await fetchData(ctx.payload);
  })
  .action('send-notification', async ctx => {
    await sendNotification(ctx.last);
  });

// Start the engine
await cronflow.start();

// Trigger the workflow
await cronflow.trigger('my-workflow', { data: 'example' });

What's Next?

Released under the Apache 2.0 License.