Cron & Queues
Scheduled jobs with pg_cron and durable queues with pgmq.
5 pages · start with Scheduled jobs with pg_cron
- 01Scheduled jobs with pg_cronSchedule SQL and HTTP calls inside your SupaHost project with pg_cron. Create jobs from the Cron tab or with cron.schedule, call Edge Functions with pg_net, and manage jobs.
- 02Cron syntax and examplesHow to write pg_cron schedules on SupaHost. The five cron fields, ranges, lists and steps, sub-minute "N seconds" schedules, UTC times, and a table of ready-to-use examples.
- 03Monitoring and debugging cron jobsCheck whether pg_cron jobs ran on SupaHost, find failures in cron.job_run_details and the Cron tab's Recent runs, debug pg_net HTTP calls, and set up an alert for failing jobs.
- 04Queues with pgmqDurable message queues inside your SupaHost project's Postgres with pgmq. Enable Queues, create a queue, send and read messages through pgmq_public, and understand visibility timeouts.
- 05Processing queue messagesBuild a pgmq queue worker on SupaHost. An Edge Function reads batches from pgmq_public, retries failures with visibility timeouts, sets aside poison messages, and runs every minute from cron.