pg-cron
pg_cron
pg_cron is an open-source extension that provides a simple cron-based job scheduler for PostgreSQL, allowing you to schedule PostgreSQL commands directly from the database.
Follow the quick start to set up extension-update email
alerts first, then use the CronJob to install and refresh the catalog. These
examples inherit image references and runtime settings from the catalog. The Cluster YAML
is an excerpt: replace imageCatalogRef: ... with your catalog reference and
keep your existing instance and storage settings.
Usage
PostgreSQL compatibility
pg_cron 1.6.8 images using PGDG package revision +3 require PostgreSQL 18.7
or later within major version 18. Upgrade PostgreSQL first: on 18.6, pg_cron
prevents startup with undefined symbol: heap_datum_check. CNPG does not
enforce extension minimum minor versions.
1. Add the cron extension image to your Cluster
Define the pg-cron extension under the postgresql.extensions section of
your Cluster resource. For example:
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: cluster-pg-cron
spec:
imageCatalogRef: ...
postgresql:
parameters:
cron.database_name: app
cron.use_background_workers: 'on'
shared_preload_libraries:
- pg_cron
extensions:
- name: pg-cron
2. Enable the extension in a database
Once the extension's files are available in the cluster, you can install it in a database in either of two ways:
- Declaratively, using a CloudNativePG
Databaseresource. - Through SQL, by running
CREATE EXTENSION pg_cron;in the target database.
Platform teams may make extension containers available across their clusters without installing every extension in every database. Install only the extensions a database uses; letting users enable them through SQL alongside the rest of their DDL schema management code can be a convenient approach.
For extensions that normally require superuser privileges, platform teams can use pgextwlist to allow non-superusers to install an administrator-approved selection of extensions.
3. Verify installation
Once the database is ready, connect to it with psql and run:
\dx
You should see pg_cron listed among the installed extensions.
Licenses and Copyright
This container image contains software that may be licensed under various open-source licenses.
All relevant license and copyright information for the pg_cron extension
and its dependencies are bundled within the image at:
/licenses/
By using this image, you agree to comply with the terms of the licenses contained therein.
Overview
pg_cron is an open-source extension that provides a simple cron-based job scheduler for PostgreSQL, allowing you to schedule PostgreSQL commands directly from the database.
Package details
- Extension version
- 1.6.8
- Image built
- Publisher
- cnpg-extensions
- Build
- Debian
- Platform
- PG 18 · Trixie · amd64
Project links
- Debian source package ↗tracker.debian.org/pkg/pg-cron
- Upstream homepage ↗github.com/citusdata/pg_cron
Links from package metadata, recipe update rules, or reviewed upstream mappings.
Database setup
- Required extensions
- None specified
- SQL installation
CREATE EXTENSION pg_cron;- SQL version
1.6— differs from extension version 1.6.8
PostgreSQL parameters
| Parameter | Value |
|---|---|
shared_preload_libraries | 'pg_cron' |
cron.database_name | app |
These recipe settings are used in automated smoke tests.
OpenSSF scorecard
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software.
View information about checks. Automated results are informational only; some categories may not apply to this project.
Scanned · View OpenSSF report ↗
Dangerous-WorkflowUnknown
Determines if the project's GitHub Action workflows avoid dangerous patterns.
Reasoning: no workflows found
Binary-Artifacts10
Determines if the project has generated executable (binary) artifacts in the source repository.
Reasoning: no binaries found in the repo
Branch-ProtectionUnknown
Determines if the default and release branches are protected with GitHub's branch protection settings.
Reasoning: internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Code-Review9
Determines if the project requires human code review before pull requests (aka merge requests) are merged.
Reasoning: Found 13/14 approved changesets -- score normalized to 9
Maintained4
Determines if the project is "actively maintained".
Reasoning: 5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Token-PermissionsUnknown
Determines if the project's workflows follow the principle of least privilege.
Reasoning: No tokens found
Fuzzing0
Determines if the project uses fuzzing.
Reasoning: project is not fuzzed
- Warn: no fuzzer integrations found
Pinned-DependenciesUnknown
Determines if the project has declared and pinned the dependencies of its build process.
Reasoning: no dependencies found
SAST0
Determines if the project uses static code analysis.
Reasoning: SAST tool is not run on all commits -- score normalized to 0
- Warn: 0 commits out of 30 are checked with a SAST tool
Security-Policy0
Determines if the project has published a security policy.
Reasoning: security policy file not detected
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
CII-Best-Practices0
Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.
Reasoning: no effort to earn an OpenSSF best practices badge detected
License10
Determines if the project has defined a license.
Reasoning: license file detected
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: PostgreSQL License: LICENSE:0
Overview
pg_cron is an open-source extension that provides a simple cron-based job scheduler for PostgreSQL, allowing you to schedule PostgreSQL commands directly from the database.
Package details
- Extension version
- 1.6.8
- Image built
- Publisher
- cnpg-extensions
- Build
- Debian
- Platform
- PG 18 · Trixie · arm64
Project links
- Debian source package ↗tracker.debian.org/pkg/pg-cron
- Upstream homepage ↗github.com/citusdata/pg_cron
Links from package metadata, recipe update rules, or reviewed upstream mappings.
Database setup
- Required extensions
- None specified
- SQL installation
CREATE EXTENSION pg_cron;- SQL version
1.6— differs from extension version 1.6.8
PostgreSQL parameters
| Parameter | Value |
|---|---|
shared_preload_libraries | 'pg_cron' |
cron.database_name | app |
These recipe settings are used in automated smoke tests.
OpenSSF scorecard
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software.
View information about checks. Automated results are informational only; some categories may not apply to this project.
Scanned · View OpenSSF report ↗
Dangerous-WorkflowUnknown
Determines if the project's GitHub Action workflows avoid dangerous patterns.
Reasoning: no workflows found
Binary-Artifacts10
Determines if the project has generated executable (binary) artifacts in the source repository.
Reasoning: no binaries found in the repo
Branch-ProtectionUnknown
Determines if the default and release branches are protected with GitHub's branch protection settings.
Reasoning: internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Code-Review9
Determines if the project requires human code review before pull requests (aka merge requests) are merged.
Reasoning: Found 13/14 approved changesets -- score normalized to 9
Maintained4
Determines if the project is "actively maintained".
Reasoning: 5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Token-PermissionsUnknown
Determines if the project's workflows follow the principle of least privilege.
Reasoning: No tokens found
Fuzzing0
Determines if the project uses fuzzing.
Reasoning: project is not fuzzed
- Warn: no fuzzer integrations found
Pinned-DependenciesUnknown
Determines if the project has declared and pinned the dependencies of its build process.
Reasoning: no dependencies found
SAST0
Determines if the project uses static code analysis.
Reasoning: SAST tool is not run on all commits -- score normalized to 0
- Warn: 0 commits out of 30 are checked with a SAST tool
Security-Policy0
Determines if the project has published a security policy.
Reasoning: security policy file not detected
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
CII-Best-Practices0
Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.
Reasoning: no effort to earn an OpenSSF best practices badge detected
License10
Determines if the project has defined a license.
Reasoning: license file detected
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: PostgreSQL License: LICENSE:0
Overview
pg_cron is an open-source extension that provides a simple cron-based job scheduler for PostgreSQL, allowing you to schedule PostgreSQL commands directly from the database.
Package details
- Extension version
- 1.6.8
- Image built
- Publisher
- cnpg-extensions
- Build
- Debian
- Platform
- PG 18 · Bookworm · amd64
Project links
- Debian source package ↗tracker.debian.org/pkg/pg-cron
- Upstream homepage ↗github.com/citusdata/pg_cron
Links from package metadata, recipe update rules, or reviewed upstream mappings.
Database setup
- Required extensions
- None specified
- SQL installation
CREATE EXTENSION pg_cron;- SQL version
1.6— differs from extension version 1.6.8
PostgreSQL parameters
| Parameter | Value |
|---|---|
shared_preload_libraries | 'pg_cron' |
cron.database_name | app |
These recipe settings are used in automated smoke tests.
OpenSSF scorecard
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software.
View information about checks. Automated results are informational only; some categories may not apply to this project.
Scanned · View OpenSSF report ↗
Dangerous-WorkflowUnknown
Determines if the project's GitHub Action workflows avoid dangerous patterns.
Reasoning: no workflows found
Binary-Artifacts10
Determines if the project has generated executable (binary) artifacts in the source repository.
Reasoning: no binaries found in the repo
Branch-ProtectionUnknown
Determines if the default and release branches are protected with GitHub's branch protection settings.
Reasoning: internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Code-Review9
Determines if the project requires human code review before pull requests (aka merge requests) are merged.
Reasoning: Found 13/14 approved changesets -- score normalized to 9
Maintained4
Determines if the project is "actively maintained".
Reasoning: 5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Token-PermissionsUnknown
Determines if the project's workflows follow the principle of least privilege.
Reasoning: No tokens found
Fuzzing0
Determines if the project uses fuzzing.
Reasoning: project is not fuzzed
- Warn: no fuzzer integrations found
Pinned-DependenciesUnknown
Determines if the project has declared and pinned the dependencies of its build process.
Reasoning: no dependencies found
SAST0
Determines if the project uses static code analysis.
Reasoning: SAST tool is not run on all commits -- score normalized to 0
- Warn: 0 commits out of 30 are checked with a SAST tool
Security-Policy0
Determines if the project has published a security policy.
Reasoning: security policy file not detected
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
CII-Best-Practices0
Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.
Reasoning: no effort to earn an OpenSSF best practices badge detected
License10
Determines if the project has defined a license.
Reasoning: license file detected
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: PostgreSQL License: LICENSE:0
Overview
pg_cron is an open-source extension that provides a simple cron-based job scheduler for PostgreSQL, allowing you to schedule PostgreSQL commands directly from the database.
Package details
- Extension version
- 1.6.8
- Image built
- Publisher
- cnpg-extensions
- Build
- Debian
- Platform
- PG 18 · Bookworm · arm64
Project links
- Debian source package ↗tracker.debian.org/pkg/pg-cron
- Upstream homepage ↗github.com/citusdata/pg_cron
Links from package metadata, recipe update rules, or reviewed upstream mappings.
Database setup
- Required extensions
- None specified
- SQL installation
CREATE EXTENSION pg_cron;- SQL version
1.6— differs from extension version 1.6.8
PostgreSQL parameters
| Parameter | Value |
|---|---|
shared_preload_libraries | 'pg_cron' |
cron.database_name | app |
These recipe settings are used in automated smoke tests.
OpenSSF scorecard
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software.
View information about checks. Automated results are informational only; some categories may not apply to this project.
Scanned · View OpenSSF report ↗
Dangerous-WorkflowUnknown
Determines if the project's GitHub Action workflows avoid dangerous patterns.
Reasoning: no workflows found
Binary-Artifacts10
Determines if the project has generated executable (binary) artifacts in the source repository.
Reasoning: no binaries found in the repo
Branch-ProtectionUnknown
Determines if the default and release branches are protected with GitHub's branch protection settings.
Reasoning: internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Code-Review9
Determines if the project requires human code review before pull requests (aka merge requests) are merged.
Reasoning: Found 13/14 approved changesets -- score normalized to 9
Maintained4
Determines if the project is "actively maintained".
Reasoning: 5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Token-PermissionsUnknown
Determines if the project's workflows follow the principle of least privilege.
Reasoning: No tokens found
Fuzzing0
Determines if the project uses fuzzing.
Reasoning: project is not fuzzed
- Warn: no fuzzer integrations found
Pinned-DependenciesUnknown
Determines if the project has declared and pinned the dependencies of its build process.
Reasoning: no dependencies found
SAST0
Determines if the project uses static code analysis.
Reasoning: SAST tool is not run on all commits -- score normalized to 0
- Warn: 0 commits out of 30 are checked with a SAST tool
Security-Policy0
Determines if the project has published a security policy.
Reasoning: security policy file not detected
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
CII-Best-Practices0
Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.
Reasoning: no effort to earn an OpenSSF best practices badge detected
License10
Determines if the project has defined a license.
Reasoning: license file detected
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: PostgreSQL License: LICENSE:0
Dependencies
Packages shipped in this image, including the extension itself.
1 packages · Scanned
| Package / installed version | License evidence | Advisories |
|---|---|---|
postgresql-18-cron ↗ 1.6.8-1.pgdg13+3 | LicenseRef-citus AND LicenseRef-cron | No ↗ |
No packages match these filters. Try a different name or license, or clear the filters.
Dependencies
Packages shipped in this image, including the extension itself.
1 packages · Scanned
| Package / installed version | License evidence | Advisories |
|---|---|---|
postgresql-18-cron ↗ 1.6.8-1.pgdg13+3 | LicenseRef-citus AND LicenseRef-cron | No ↗ |
No packages match these filters. Try a different name or license, or clear the filters.
Dependencies
Packages shipped in this image, including the extension itself.
1 packages · Scanned
| Package / installed version | License evidence | Advisories |
|---|---|---|
postgresql-18-cron ↗ 1.6.8-1.pgdg12+3 | LicenseRef-citus AND LicenseRef-cron | No ↗ |
No packages match these filters. Try a different name or license, or clear the filters.
Dependencies
Packages shipped in this image, including the extension itself.
1 packages · Scanned
| Package / installed version | License evidence | Advisories |
|---|---|---|
postgresql-18-cron ↗ 1.6.8-1.pgdg12+3 | LicenseRef-citus AND LicenseRef-cron | No ↗ |
No packages match these filters. Try a different name or license, or clear the filters.
Licenses
Original license files shipped in the selected container image.
1 file read directly from /licenses.
/licenses/postgresql-18-cron/copyrightRead notice
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pg_cron Source: https://github.com/citusdata/pg_cron Files: * Copyright: Copyright (c) 2015-2017 Citus Data License: citus Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. . IN NO EVENT SHALL CITUS DATA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF CITUS DATA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . CITUS DATA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND CITUS DATA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. Files: src/entry.c src/misc.c Copyright: Copyright 1988,1990,1993,1994 by Paul Vixie License: cron All rights reserved . Distribute freely, except: don't remove my name from the source or documentation (don't take credit for my work), mark your changes (don't get me blamed for your possible bugs), don't alter or remove this notice. May be sold if buildable source is provided to buyer. No warrantee of any kind, express or implied, is included with this software; use at your own risk, responsibility for damages (if any) to anyone resulting from the use of this software rests entirely with the user.
SHA256: f7e1c30cdd160e9b3306f123bccfe1ab2707eb3a861a01206ea6f694f0e5dbe6
Licenses
Original license files shipped in the selected container image.
1 file read directly from /licenses.
/licenses/postgresql-18-cron/copyrightRead notice
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pg_cron Source: https://github.com/citusdata/pg_cron Files: * Copyright: Copyright (c) 2015-2017 Citus Data License: citus Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. . IN NO EVENT SHALL CITUS DATA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF CITUS DATA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . CITUS DATA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND CITUS DATA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. Files: src/entry.c src/misc.c Copyright: Copyright 1988,1990,1993,1994 by Paul Vixie License: cron All rights reserved . Distribute freely, except: don't remove my name from the source or documentation (don't take credit for my work), mark your changes (don't get me blamed for your possible bugs), don't alter or remove this notice. May be sold if buildable source is provided to buyer. No warrantee of any kind, express or implied, is included with this software; use at your own risk, responsibility for damages (if any) to anyone resulting from the use of this software rests entirely with the user.
SHA256: f7e1c30cdd160e9b3306f123bccfe1ab2707eb3a861a01206ea6f694f0e5dbe6
Licenses
Original license files shipped in the selected container image.
1 file read directly from /licenses.
/licenses/postgresql-18-cron/copyrightRead notice
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pg_cron Source: https://github.com/citusdata/pg_cron Files: * Copyright: Copyright (c) 2015-2017 Citus Data License: citus Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. . IN NO EVENT SHALL CITUS DATA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF CITUS DATA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . CITUS DATA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND CITUS DATA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. Files: src/entry.c src/misc.c Copyright: Copyright 1988,1990,1993,1994 by Paul Vixie License: cron All rights reserved . Distribute freely, except: don't remove my name from the source or documentation (don't take credit for my work), mark your changes (don't get me blamed for your possible bugs), don't alter or remove this notice. May be sold if buildable source is provided to buyer. No warrantee of any kind, express or implied, is included with this software; use at your own risk, responsibility for damages (if any) to anyone resulting from the use of this software rests entirely with the user.
SHA256: f7e1c30cdd160e9b3306f123bccfe1ab2707eb3a861a01206ea6f694f0e5dbe6
Licenses
Original license files shipped in the selected container image.
1 file read directly from /licenses.
/licenses/postgresql-18-cron/copyrightRead notice
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pg_cron Source: https://github.com/citusdata/pg_cron Files: * Copyright: Copyright (c) 2015-2017 Citus Data License: citus Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. . IN NO EVENT SHALL CITUS DATA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF CITUS DATA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . CITUS DATA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND CITUS DATA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. Files: src/entry.c src/misc.c Copyright: Copyright 1988,1990,1993,1994 by Paul Vixie License: cron All rights reserved . Distribute freely, except: don't remove my name from the source or documentation (don't take credit for my work), mark your changes (don't get me blamed for your possible bugs), don't alter or remove this notice. May be sold if buildable source is provided to buyer. No warrantee of any kind, express or implied, is included with this software; use at your own risk, responsibility for damages (if any) to anyone resulting from the use of this software rests entirely with the user.
SHA256: f7e1c30cdd160e9b3306f123bccfe1ab2707eb3a861a01206ea6f694f0e5dbe6
Versions
Extension versions and the images built from them.
Tagged GHCR builds fetched .
