# pg_cron

6 Hacker News commenters recommended pg_cron and 0 criticized it, November 2025 to November 2026. It was recommended in 6 of 13 months.

**Verdict:** Free Postgres extension that runs SQL jobs on a cron schedule, used to trim old rows and flush queues from inside the database.

## Why people recommend it

- Schedules recurring SQL jobs inside Postgres (2 comments): "I like CREATE EVENT / pg_cron for trimming append-only tables when the data has aged out." ([source](https://news.ycombinator.com/item?id=49771766)) "select cron.schedule('flush-queue', '* * * * *'" ([source](https://news.ycombinator.com/item?id=45816424))
- Users keep using it (1 comments): "I use PGQM and PG_CRON now... Not looking back." ([source](https://news.ycombinator.com/item?id=46614972))
- Pairs well with pgmq (1 comments): "pgclaw would pair well with pgmq and pg_cron" ([source](https://news.ycombinator.com/item?id=46994764))

## Alternatives hackers recommend

- [pgvector](https://hackerapproved.com/p/pgvector.md): 55 recommend
- [PostGIS](https://hackerapproved.com/p/postgis.md): 20 recommend
- [pg_lake](https://hackerapproved.com/p/pg-lake.md): 18 recommend
- [ParadeDB](https://hackerapproved.com/p/paradedb.md): 13 recommend
- [pg_textsearch](https://hackerapproved.com/p/pg-textsearch.md): 10 recommend

## Cite as

Hacker Approved, "pg_cron", https://hackerapproved.com/p/pg-cron/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
