{"repo":"citusdata/pg_cron","free":true,"listed":false,"github":"https://github.com/citusdata/pg_cron","clone":"git clone https://github.com/citusdata/pg_cron.git","description":"Run periodic jobs in PostgreSQL","language":"C","stars":3871,"topics":["postgresql","cron","periodic-jobs","scheduler"],"license":"PostgreSQL","category":"databases-storage","readme_excerpt":"What is pg cron? pg cron is a simple cron-based job scheduler for PostgreSQL (10 or higher) that runs inside the database as an extension. --- Contents - How pg cron works - Cron syntax - Managing and creating jobs - Creating a cron job - Creating a cron job in a different database - Removing a cron job - Altering a cron job - Installing pg cron - Setting up pg cron - Monitoring jobs - Example use cases - Managed services - Code of Conduct --- How pg cron works The extension creates a background worker that tracks jobs in the cron.job table. Based on your configurations, to execute a job, the extension establishes a Postgres connection or spawns a database worker. pg cron can run multiple jobs in parallel, but only one instance of each specific job at a time. If a second instance is triggered before the first finishes, it’s queued and starts as soon as the first one completes. Cron syntax The code in pg cron that handles parsing and scheduling comes directly from the cron source code by Paul Vixie, hence the same options are supported. An easy way to create a cron schedule is: crontab.guru. pg cron also allows you: - to use $ to indicate last day of the month. - to use [1-59] seconds to schedule a job based on an interval. Note, you cannot use seconds with the other time units. Example cron schedules: Managing and creating jobs Cron jobs can be managed by directly interacting with the cron.job table if you have the required permissions. However, it is recommended to use the c","default_branch":null,"files":null,"tree":[],"storefront":"/r/citusdata","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/citusdata/pg_cron/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}