# citusdata/pg_cron

Run periodic jobs in PostgreSQL

Repository: https://github.com/citusdata/pg_cron
Canonical: https://ross.abutalabs.com/products/pg_cron
Language: C
License: PostgreSQL
License Family: other
Topics: postgresql, cron, periodic-jobs, scheduler
Last push: 2026-07-21T09:26:36+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 46, longevity 100
- inputs: {"age_days": 3650, "days_push": 43, "days_rel": 363, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3872, forks 260 (observed 2026-08-28T04:08:27.812487+00:00)

## What it is
pg_cron is a cron-based job scheduler for PostgreSQL that runs inside the database as an extension. It uses a background worker to track and execute periodic SQL jobs defined in the cron.job table using standard cron syntax.

## Use cases
- schedule periodic SQL jobs in PostgreSQL
- run database maintenance tasks nightly
- clean up old rows on a schedule
- run recurring queries every few minutes
- schedule jobs with second-level intervals
- replace external cron for database tasks

## When to choose
- you need periodic jobs that live inside PostgreSQL
- you want cron syntax for scheduling SQL commands
- you want to avoid external schedulers for database tasks

## When to avoid
- you need scheduling outside the database
- you use PostgreSQL versions older than 10
- you need distributed job orchestration across services

## Facets
- artifact type: library
- maturity: stable
- function: scheduling, database, workflow-automation
- domain: databases, developer-tools
- platform: self-hosted
- tags: postgresql-extension, cron, background-jobs, sql, automation, linux, macos, docker

## Member repositories
- citusdata/pg_cron (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:27.812487+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:25:47.766006+00:00, confidence not recorded.
  - readme: https://github.com/citusdata/pg_cron (fetched 2026-08-28T04:08:27.812487+00:00, sha 98758e0ca116)
- Data as of 2026-08-30T08:39:29.467469+00:00.
