pg_cron
Location: /scripts/sql/pg_cron_setup.sql
- pg_cron must be added to 'shared_preload_libraries'
- Reboot required
- pg_cron runs in the default postgres database, then jobs can be moved to specific databases
- For AWS RDS: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL_pg_cron.html
Basic Instructions
- Create a function / procedure to run
- Schedule it with a name
- Set the database name for the job to the correct db
- Check that the job details show it has run successfully
Note
pg_cron
is not being used anymore, in favor of APScheduler
in the ichrisbirch/scheduler
directory.