Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Last Updated: 2026-03-19

Overview

The Execution Timeout & Watchdog feature automatically detects and handles workflow executions that exceed their configured deadline. A background watchdog (pg_cron) periodically scans for overdue executions and applies the configured timeout behavior.

Configuration

Global Settings (FW Settings Page)

Navigate to Settings → Forms & Workflow → Timeouts tab to configure:
SettingDefaultRangeDescription
Execution Timeout WatchdogOffOn/OffEnable/disable automatic timeout detection
Default Timeout (Minutes)601–1440Default maximum execution duration
Warning Threshold (%)8050–99Percentage at which warning notifications are sent
Check Interval (Minutes)51–60How often the watchdog scans for overdue executions

Per-Workflow Settings (Workflow Editor)

Each workflow definition can override timeout settings via the Timeout Configuration panel in the workflow editor:
SettingDefaultDescription
Enable TimeoutOffOverride global setting for this workflow
Max Duration (Minutes)60Maximum allowed execution time
Warning Threshold (%)80When to send at-risk warnings
On TimeoutFailAction when deadline exceeded: Fail, Cancel, or Escalate

Timeout Behaviors

BehaviorDescription
FailSets execution status to timed_out, records error, routes to DLQ
CancelSets execution status to cancelled, records timeout reason
EscalateSets execution status to timed_out, sends escalation notification to admins

Deadline Extension

Administrators with fw.workflows.admin permission can extend a running execution’s deadline:
  1. Open the execution detail dialog
  2. Click the Extend button next to the deadline indicator
  3. Enter the extension duration (1–1440 minutes) and a reason (minimum 5 characters)
  4. Click Extend Deadline
The extension resets the warning notification flag, allowing a new warning to be sent if the execution approaches the new deadline.

Monitoring

Execution Detail View

The deadline indicator shows real-time status:
StatusColorDescription
On TrackGreenExecution is within safe time limits
At RiskYellow/WarningExecution has exceeded the warning threshold
ExpiredRed/DestructiveExecution has exceeded its deadline
No DeadlineGrayNo timeout configured

Notifications (PF-10)

The watchdog sends two types of notifications:
  1. Timeout Warning — Sent once when an execution reaches the warning threshold
  2. Execution Timed Out — Sent when an execution is terminated due to timeout

pg_cron Setup

The watchdog requires a pg_cron job to be registered. This is not included in migrations (contains environment-specific values). Register via the SQL Editor:
SELECT cron.schedule(
  'workflow-timeout-watchdog',
  '*/5 * * * *',
  $$
  SELECT net.http_post(
    url := 'https://<PROJECT_REF>.supabase.co/functions/v1/workflow-timeout-checker',
    headers := '{"Content-Type": "application/json", "Authorization": "Bearer <ANON_KEY>"}'::jsonb,
    body := concat('{"time": "', now(), '"}')::jsonb
  ) AS request_id;
  $$
);
Replace <PROJECT_REF> and <ANON_KEY> with your project values.

Troubleshooting

IssueCheck
Watchdog not runningVerify pg_cron job exists: SELECT * FROM cron.job WHERE jobname = 'workflow-timeout-watchdog'
No timeout notificationsVerify fw_timeout_enabled is true in fw_module_settings
Executions not timing outVerify deadline_at is set on executions and timeout_config.enabled on the workflow definition
Extension failingVerify user has fw.workflows.admin permission and execution is in running/paused status