pg_cron
« Back to VersTracker
Description:
Run periodic jobs in PostgreSQL
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Databases
Tags: postgresql scheduling cron automation database
Install: brew install pg_cron
About:
PgCron is a PostgreSQL extension that enables the scheduling of database jobs directly within the database engine. It allows users to run SQL queries and maintainable functions on a cron-like schedule, managed entirely via standard SQL commands. This provides a robust solution for automating routine database maintenance, data aggregation, and batch processing tasks.
Key Features:
  • SQL-based job management
  • Cron-like scheduling syntax
  • Runs inside the database process
  • Supports concurrent job execution
Use Cases:
  • Automating periodic data cleanup and vacuuming
  • Scheduling regular database backups
  • Running nightly data aggregation or ETL jobs
Alternatives:
  • pgAgent – PgAgent is a job scheduler that runs as a separate daemon, whereas PgCron operates entirely within the database.
  • System Cron – Standard system cron requires external scripts and connection management, while PgCron executes SQL directly.
Version History
Detected Version Rev Change Commit
Dec 12, 2024 2:07pm 0 VERSION_BUMP eb41a362
Oct 22, 2024 11:23am 1 VERSION_BUMP 94aae41e
Oct 22, 2024 4:19am 1 VERSION_BUMP 0a47f66e
Sep 28, 2024 7:42pm 0 VERSION_BUMP 3b97cd71