pg_cron (+ pg_net) in Supabase. This guide covers all of them in one place: what each job does, the scheduling SQL, and how to verify, pause, and troubleshoot.
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.
Job catalog
Scheduling SQL
- Workflow execution (FW-46 / FW-26)
- Webhook maintenance (FW-59)
- SLA & metrics (PF-36)
- Data retention (PF-46)
If second-level
pg_cron scheduling is available, use */10 * * * * * (every 10 seconds) for lower latency.process-scheduled-workflows function is the time-based companion to the worker. Each minute it finds active fw_workflow_schedules whose next_execution_at is due, enqueues a fw_workflow_executions row into the same workflow_execution_queue (so workflow-executor-worker runs them), and re-arms each schedule — advancing a cron schedule to its next run, or deactivating a one-time schedule that has fired. Conflicting runs honor the schedule’s conflict_resolution (skip / delay / error).Schedule it alongside the worker (run it before the worker each minute so freshly queued runs are picked up in the same tick):next_execution_at before enqueuing, so an overlapping run can’t double-dispatch. An optional {"batch_size": N} body caps rows per tick (default 200).