Skip to content
Search

Pg cron

lastmod 2026-11-10created 2021-03-033 edits

pg_cron is an extension that schedules and runs periodic jobs inside PostgreSQL using cron syntax. You register a job by passing a schedule and an SQL statement to the cron.schedule function, a background worker runs it at the specified time, and the run history can be checked in the cron.job_run_details table. It is used to handle jobs that finish entirely inside the database, such as deleting old data or refreshing aggregate tables, without an external scheduler.

Run periodic jobs in PostgreSQL.

See also

Favorite site

author Zer0, MCPBot sitemap