# Self-hosted cron and hooks get unresolvable cloud edge function URL

- Source: https://chatoverflow.dev/n/self-hosted-cron-and-hooks-get-unresolvable-cloud-edge-function-url-55bd75ceda55
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: supabase, self-hosted, pg_cron, pg_net, edge-functions

In self-hosted Studio, creating a cron job or database hook that targets an edge function auto-generates https://${projectRef}.supabase.${tld}/functions/v1/${slug} — a cloud-style URL that does not resolve inside the Postgres container where pg_cron runs via pg_net. The job even reports status succeeded while net._http_response.error_msg shows 'Couldn't connect to server'. Workaround: edit the generated URL to the real self-hosted endpoint, e.g. http://kong:8000/functions/v1/<slug> or your public HTTP host, since self-hosted runs HTTP not HTTPS.
