Scheduled Flows
Not all integrations are event-driven. fyrn supports scheduled execution, polling, and manual triggers for batch jobs, periodic syncs, and on-demand operations.
Cron trigger
Section titled “Cron trigger”Run a flow on a schedule using standard 5-field cron syntax:
flow: daily-report-syncversion: 1source: connector: report-api trigger: schedule schedule: "0 6 * * *" # Every day at 6:00 AM timezone: "Europe/Helsinki" # IANA timezonetarget: connector: data-warehouse endpoint: /api/reports method: POSTmapping: report_date: '"" | now | date("YYYY-MM-DD")'on_error: retry: 3x exponential(60s) then: dead-letterCron format
Section titled “Cron format”┌───────────── minute (0-59)│ ┌───────────── hour (0-23)│ │ ┌───────────── day of month (1-31)│ │ │ ┌───────────── month (1-12)│ │ │ │ ┌───────────── day of week (0-7, Sun=0 or 7)│ │ │ │ │* * * * *Examples:
| Cron | Description |
|---|---|
0 6 * * * | Every day at 6:00 AM |
0 9 * * 1-5 | Weekdays at 9:00 AM |
*/15 * * * * | Every 15 minutes |
0 0 1 * * | First of every month at midnight |
0 6 1 * * | First of every month at 6:00 AM |
Poll trigger
Section titled “Poll trigger”Poll an external API for new records on a periodic basis:
flow: poll-legacy-ordersversion: 1source: connector: legacy-system trigger: poll poll: url: https://api.example.com/orders method: GET headers: Authorization: "Bearer {{instance.api_key}}" params: status: new limit: "100" records_path: data.orders pagination: strategy: cursor cursor_path: meta.next_cursor cursor_param: after max_pages: 100target: connector: erp-system endpoint: /api/orders method: POSTmapping: order_id: source.id total: source.amount | decimal(2)on_error: retry: 3x exponential(30s) then: dead-letterPagination strategies
Section titled “Pagination strategies”fyrn supports four pagination strategies for poll triggers:
cursor — Pass a cursor value from the response to the next request:
pagination: strategy: cursor cursor_path: meta.next_cursor cursor_param: afteroffset — Increment a numeric offset by the page size:
pagination: strategy: offset offset_param: offset page_size: 100 total_path: meta.total_countlink_header — Follow the Link header’s rel="next" URL (common in GitHub-style APIs):
pagination: strategy: link_headernext_token — Use a token from the response body (common in AWS-style APIs):
pagination: strategy: next_token token_path: NextToken token_param: NextTokenAll strategies support max_pages to cap the number of pages fetched per poll cycle.
See DSL Reference — Poll Config for all pagination strategies.
Manual trigger
Section titled “Manual trigger”Run a flow on demand from the CLI or UI:
source: connector: import-service trigger: manual# Trigger via CLI (send payload through the flow)fyrn flow show <flow-id> # get webhook URLcurl -X POST <webhook-url> -d '{"data": "..."}'Schedule management
Section titled “Schedule management”# List all schedulesfyrn schedules list
# Manually trigger a scheduled flowfyrn schedules trigger my-flowfyrn schedules trigger <flow-id>{ "name": "list_schedules", "arguments": {}}{ "name": "update_schedule", "arguments": { "schedule_id": "...", "cron_expression": "0 9 * * 1-5", "timezone": "America/New_York", "enabled": true }}Manage schedules programmatically via the REST API:
# List all schedulesGET /api/v1/schedules
# Update a schedule (cron, timezone, enabled)PUT /api/v1/schedules/:idContent-Type: application/json{"cron_expression": "0 9 * * 1-5", "timezone": "America/New_York", "enabled": true}
# Trigger a scheduled flow immediately (outside its normal cron cycle)POST /api/v1/schedules/:id/triggerSee the API Reference for authentication headers and full response schemas.
Schedule states
Section titled “Schedule states”Each schedule tracks:
| Field | Description |
|---|---|
cronExpression | The cron pattern |
timezone | IANA timezone |
enabled | Whether the schedule is active |
lastRunAt | When it last executed |
nextRunAt | When it will execute next |
lastRunStatus | success, failed, or running |
What’s next
Section titled “What’s next”- Batch Processing — Process arrays of records through a flow
- CLI Usage — All
fyrn schedulescommands - DSL Reference — Source config specification