citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.7k stars 187 forks source link

Enable pg_cron in distributed PostgreSQL system #313

Open cwang9208 opened 4 months ago

cwang9208 commented 4 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 3 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.