0

I am looking a way that can give the ability to schedule jobs on PostgreSQL, for example to schedule execution of some procedures or statements based on interval or on specific schedule.

I tried already the pg_agent but this is a service running in local pc and which enables a schema in PostgreSQL. As a result this cannot be used for remote instances or managed instances.

I am looking a way that they can be triggered from the database context and not from another runtime.

Any ideas?

3
  • I recommend pg_timetable. Commented Nov 25, 2022 at 6:57
  • Thanks, Is there any native extension coming with the installation of the Postgres? Commented Nov 25, 2022 at 8:11
  • No, there isn't, otherwise we would have told you. Commented Nov 25, 2022 at 8:16

2 Answers 2

3

Any job scheduler can satisfy your needs. Either way a client will trigger an SQL statement. If you insist that PostgreSQL should be the service that triggers the statement then you can use pg_cron extension.

1
  • Thanks, Is there any native extension coming with the installation of the Postgres? Commented Nov 25, 2022 at 8:11
0

I was checking where I could find a PostgreSQL coming with these extensions out-of-the box. Found that:

  1. Azure for Postgres Single server has limited extension lists and does not contain something which can act as a scheduler.
  2. Azure for Postgres Flexible server has more available extensions and does contain something which can act as a scheduler the pg_cron mentioned in previous answers.
  3. Local installation of Postgres can be installed using the StackBuilder Application from EDB where can install also the pgAgent, but this is a service which is going to run on the host machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.