pg_timetable is a PostgreSQL job scheduler developed by CYBERTEC. It offers cutting edge flexibility and a large variety of features.

Job scheduling is one of the most important topics in modern database management. In the PostgreSQL ecosystems, pgAgent and pg_cron have become quite popular. However, both tools have a fair amount of limitations. Hence, we have decided to release our own solution: Welcome pg_timetable, the next generation PostgreSQL job scheduler.

Why pg_timetable?

1. Reliable and stable architecture

2. Support for complex execution

  • Support for complex tasks chains
  • Ability to create modules
  • Sophisticated error handling
  • Support for transactional execution
  • Concurrency protection

3. Ability to execute different types of tasks

  • SQL scripts
  • Shell executables
  • Built in tasks (send mails, etc.)
  • Self-destructive chains

1. Reliable and stable architecture

How pg_timetable works

pg_timetable is a simple, easy to run executable, which connects to PostgreSQL. It is not part of the server infrastructure itself. For this reason, it neither poses a security threat nor a stability concern to your server. It runs independently and is implemented as a simple, robust architecture.

pg_timetable is 100% database driven and allows you to use PostgreSQL alone to control your workflows. All log is stored in the database and therefore, it is super easy to dissect logging information using plain SQL. You can also visualize data and execution logs fast and easily using a technology stack of your choice.

2. Support for complex execution

Execute complex workflows

Traditional job schedulers, such as cron or pg_cron, can either launch scripts or execute SQL. It seems to be very hard to combine those tasks, topping that of with problems of modularization. pg_timetable helps you to run those operations. “Base tasks” can be combined in a flexible way and entire “chains” can be executed on a regular basis which gives you a lot of flexibility.


PostgreSQL jobs and concurrency protection

Additionally, pg_timetable offers built in concurrency protection. This means that it prevents single jobs from continuously launching themselves, while slowly killing your server. By using a simple flag, pg_timetable allows you to synchronize complex workflows.


Transaction jobs and error handling

Mostly, a job should run in a database transaction and should either fail or succeed entirely – nothing in between. pg_timetable is completely based on transactions. Therefore, it allows you to flexibly combine “base tasks” in single transactions which adds reliability and integrity to your task chains.

3. Ability to execute different types of tasks

Configuring pg_timetable “cron style”

In general, pg_timetable can be configured using plain SQL. However, some people prefer cron-style configuration. In order to get you started quickly, pg_timetable also supports a cron-style configuration interface to make it easier to quickly configure jobs. This is especially useful if you want to run simple jobs. It will then automatically translate your configuration to the more advanced pg_timetable.

Self-destructive chains

What if you want to schedule a task which should only be executed exactly once in case it is successful? For example, you want to delete a user in two weeks from now or send a reminder to a client only once. pg_timetable allows you to very easily schedule self-destructive chains, exactly for those reasons.

4. pg_timetable: Cloud-ready by design

pg_timetable has been designed to be cloud-ready from the start. Simply run pg_timetable as a Docker container, make use of Kubernetes and / or OpenShift. There are no external dependencies. pg_timetable is available as a container and as a statically linked binary for simple use. You can deploy pg_timetable with any cloud provider.

If you are running pg_timetable in a cloud environment the ability to run command line tools can be easily disabled using a simple parameter:

--no-program-tasks Disable executing of PROGRAM

This ensures maximum security and reliable scheduling in any environment.


Contact us if you want to know more!


pg_timetable is Open Source and can be used freely by everyone. Download the source code from GitHub or use the Dockerfile if you want to directly run it in a container.

Download >>

As always, we encourage you to contribute to our Open Source solution and to send patches.