Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: improve edge function example in pg_cron (#29067)

Rodrigo Mansueli73aae6172c77
diff --git a/apps/docs/content/guides/database/extensions/pg_cron.mdx b/apps/docs/content/guides/database/extensions/pg_cron.mdx
index 29da04430f5..22a0efe7b64 100644
--- a/apps/docs/content/guides/database/extensions/pg_cron.mdx
+++ b/apps/docs/content/guides/database/extensions/pg_cron.mdx
@@ -129,8 +129,9 @@ select
select
net.http_post(
url:='https://project-ref.supabase.co/functions/v1/function-name',
- headers:='{"Content-Type": "application/json", "Authorization": "Bearer YOUR_ANON_KEY"}'::jsonb,
- body:=concat('{"time": "', now(), '"}')::jsonb
+ headers:=jsonb_build_object('Content-Type','application/json', 'Authorization', 'Bearer ' || 'YOUR_ANON_KEY'),
+ body:=jsonb_build_object('time', now() ),
+ timeout_milliseconds:=5000
) as request_id;
$$
);