The FW-46 edge functionDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
workflow-executor-worker needs to be scheduled via pg_cron to process queued workflow executions.
Prerequisites
Enable extensions in the Supabase Dashboard → Extensions:pg_cronpg_net
util.invoke_edge_function is available and app.settings.service_role_key is configured in Vault.
Scheduling SQL
Run this in the Supabase SQL Editor (NOT as a migration — it uses theutil.invoke_edge_function helper which depends on project-specific Vault settings):
Note: If second-levelpg_cronscheduling is available, use*/10 * * * * *(every 10 seconds) for lower latency.
Verification
Managing the Cron Job
Troubleshooting
| Symptom | Check |
|---|---|
| Job not running | SELECT * FROM cron.job WHERE jobname = 'process-workflow-queue'; — is it registered? |
| Job runs but worker does nothing | Check fw_module_settings.fw_execution_worker_enabled — is any org enabled? |
| Worker skips orgs | Check fw_module_settings.worker_running — stuck semaphore? Reset with runbook. |
| Edge function errors | Check Edge Function logs in Supabase Dashboard. |
Related Docs
- FW-46 Admin Guide
- FW-46 Runbook
- PF-36 Cron Scheduling — similar pattern reference