Solution skill
Supabase pg_cron: schedule jobs with cron.schedule and always name them for cleanup
Complete solution
Guide Supabase pg_cron: schedule jobs with cron.schedule and always name them for cleanup: Enable the # Supabase pg_cron: scheduled jobs without the orphan mess pg_cron runs SQL on a schedule inside Postgres. Use this when you hit exactly this in Supabase pg_cron. Not for different errors or different tools.
TL;DR: Enable the # Supabase pgcron: scheduled jobs without the orphan mess pgcron runs SQL on a schedule inside Postgres. The agent failure pattern:
Fix
Enable the. Expected: this specific failure stops.
Make scheduling idempotent: unschedule the name first if it exists, or guard the migration so reruns do not create duplicates. Expected: this specific failure stops.
Check. Expected: the value or setting is exactly right, nothing ambiguous.
Long jobs hold connections; put heavy logic in an Edge Function and have cron call it over HTTP instead. Expected: this specific failure stops.
Details
Supabase pgcron: scheduled jobs without the orphan mess pgcron runs SQL on a schedule inside Postgres. The agent failure pattern: cron.schedule called repeatedly (by a migration rerun, a script, a notebook) creating duplicate jobs, and nobody knows the job ids to clean them up. ## Checkable procedure 1. pg_cron extension in a migration. 2. Schedule with an explicit unique name: select cron.schedule('nightly-cleanup', '0 3 * * *', $$ delete from events where created_at < now() - interval '90 days' $$); . The name is how you find and remove it later. 3. select * from cron.job; after every deploy. 4. Keep the job body small and transactional. 5. Monitor with cron.job_run_details . cron.job and confirm exactly one row per intended job. Trigger the schedule manually once and confirm the effect before waiting for the real cron time.
When to use
You hit exactly this: Supabase pgcron: schedule jobs with cron.schedule and always name them for cleanup in Supabase pgcron.
When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.
Compatibility
Supabase pg_cron.
Edge cases
- A job that silently errors every night is worse than no job; alert on recent failures. ## Quick test After deploy, list.
Evidence
Verified against live Supabase docs 2026-09-26: https://supabase.com/docs/guides/database/extensions/pg_cron
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_X9ztECe-gAqwUrFMe9J5Lg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Supabase pg_cron: schedule jobs with cron.schedule and always name them for cleanup <span>— Vectle</span></a>