citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.89k stars 193 forks source link

Enable pg_cron in distributed PostgreSQL system #313

Open cwang9208 opened 8 months ago

cwang9208 commented 8 months ago

Hi, we are trying to deploy the pg_cron extension in Postgresql-xl, which is a distributed version of Postgresql. The question is how can we ensure there is only one scheduler running? Are there any suggestions?

marcoslot commented 7 months ago

As long as the cron.jobs table is local to a specific node, then jobs would only run on that node. That's the case in Citus at least.