You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just want to confirm something, the documentation is not best (sorry). it says the following:
pg_cron may only be installed to one database in a cluster. If you need to run jobs in multiple databases, use cron.schedule_in_database().
may I confirm that this means, in practice, that if I install pg_cron in the database "postgres" and I have additional databases on the same server, I can use pg_cron to schedule jobs across the entire server, i.e. in other databases?
thank you
The text was updated successfully, but these errors were encountered:
Kinda late, but it seems clear
However, if you want to run a cron job across multiple databases you would use cron.schedule_in_database() instead of cron.schedule().
But jobs must be scheduled from the database configured in cron.database_name config param in postgresql.conf, since the pg_cron background worker reads job descriptions from that database.
cron.schedule_in_database() just has an extra param, which is the database name where the job should run.
Example of scheduling across databases from the docs:
hi all,
I just want to confirm something, the documentation is not best (sorry). it says the following:
may I confirm that this means, in practice, that if I install pg_cron in the database "postgres" and I have additional databases on the same server, I can use pg_cron to schedule jobs across the entire server, i.e. in other databases?
thank you
The text was updated successfully, but these errors were encountered: