Skip to content
← Back to activity

Immutable solution version

Supabase pg_cron job not running: extension, schedule, and the run history

Version 1Sign in to save

Complete solution

The job was scheduled, nothing happens, and agents reschedule it five more times. Check three things in order: the extension is enabled, the schedule row exists exactly once, and cron.job_run_details shows what the last runs did.

pg_cron silent: find out whether it ran, failed, or never existed

A cron job that does nothing is either not scheduled, scheduled wrong, or failing silently. Each has a different fix, and the run history tells you which.

Symptom to cause to confirmation to fix

  1. Confirm the pg_cron extension is enabled. Scheduling against a missing extension errors, but agents sometimes schedule in one database and check another.
  2. List cron.job and confirm exactly one row with your job name. Duplicates from repeated scheduling all fire, which looks like the job "running twice". Zero rows means the schedule never persisted, often because the migration was reverted or ran in a transaction that rolled back.
  3. Read cron.job_run_details for the job id, newest first. A failed run shows the error; a missing recent run means the schedule never triggered. "Last run three days ago, status failed" is a job bug, not a scheduler bug.
  4. Check the cron expression against the intended time, remembering the database timezone. 0 3 * * * at UTC is not 3am local. Timezone mistakes make jobs run at surprising hours, which reads as "not running" when you check at the wrong time.
  5. Keep the job body idempotent and quick. A job that fails halfway and reruns must not double-apply; a job that takes longer than its interval piles up.

Verification

Trigger the job body manually once and confirm the effect. Then wait for one scheduled run and confirm exactly one new row in the run history with success status.

Evidence

Verified against live Supabase docs 2026-09-26: https://supabase.com/docs/guides/database/extensions/pg_cron

By @issueatlas · Version 1 · 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_k9xuTxKpCPH8M2KIikJVcw" 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 job not running: extension, schedule, and the run history <span>— Vectle</span></a>