pg_timetable
by bCloud LLC
Version 7.1.0 + Free Support on Ubuntu 26.04
pg_timetable is an advanced PostgreSQL-native job scheduling and automation tool designed to execute SQL commands, database maintenance tasks, scripts, and complex workflows directly within PostgreSQL environments. It provides flexible cron-style scheduling, task chaining, parallel execution, logging, monitoring, and error handling capabilities for reliable database automation. pg_timetable helps administrators and developers automate recurring operations, ETL processes, reporting tasks, backups, and maintenance workloads while leveraging PostgreSQL as the central scheduling platform.
Features of pg_timetable:
- Provides PostgreSQL-native job scheduling with cron-based and interval-based execution.
- Automates SQL queries, stored procedures, shell scripts, and custom workflow tasks.
- Supports task chains and workflow dependencies for complex automation scenarios.
- Enables parallel task execution for improved performance and scalability.
- Includes job retry mechanisms, error handling, and execution monitoring.
- Stores schedules, execution history, and configuration data directly in PostgreSQL.
- Supports asynchronous task processing and distributed scheduling environments.
- Provides detailed logging and auditing for operational visibility and troubleshooting.
- Offers REST API integration and extensive configuration options for enterprise deployments.
- Designed for high reliability, automation, and management of production PostgreSQL workloads.
pg_timetable usage:
$ sudo su # Verify installation: $ pg_timetable --version $ which pg_timetable # Verify Git tag version: $ cd /usr/local/src/pg_timetable $ git describe --tags # Verify service status: $ systemctl status pg_timetable $ systemctl is-active pg_timetable $ systemctl is-enabled pg_timetable # View service logs: $ journalctl -u pg_timetable -f # View recent logs: $ journalctl -u pg_timetable -n 50 # Verify PostgreSQL connection: $ PGPASSWORD='your_password' psql -h localhost -U postgres -d postgres -c "SELECT version();" # Verify timetable schema: $ PGPASSWORD='your_password' psql -h localhost -U postgres -d postgres -c "\dn" # List pg_timetable tables: $ PGPASSWORD='your_password' psql -h localhost -U postgres -d postgres -c "\dt timetable.*" # Check active scheduler session: $ PGPASSWORD='your_password' psql -h localhost -U postgres -d postgres -c "SELECT * FROM timetable.active_session;" # List configured jobs: $ PGPASSWORD='your_password' psql -h localhost -U postgres -d postgres -c "SELECT * FROM timetable.chain;" # Display scheduler clients: $ PGPASSWORD='your_password' psql -h localhost -U postgres -d postgres -c "SELECT * FROM timetable.active_session;" # Restart service: $ systemctl restart pg_timetable # Status service: $ systemctl status pg_timetable # Verify running process: $ ps -ef | grep pg_timetable # Verify binary path: $ which pg_timetable
Use Cases:
- Automating PostgreSQL database maintenance and administrative operations.
- Scheduling backups, data archiving, and database optimization tasks.
- Managing ETL pipelines and data integration workflows.
- Automating report generation and business intelligence processes.
- Executing recurring SQL scripts and stored procedures.
- Coordinating multi-step workflows with task dependencies.
- Automating DevOps and database deployment activities.
- Supporting enterprise scheduling requirements for PostgreSQL environments.
- Reducing reliance on external cron servers and scheduling platforms.
- Managing mission-critical database operations with centralized scheduling.
Disclaimer: pg_timetable is provided under its applicable open-source licensing terms. Users are responsible for implementing appropriate security controls, access management, backup strategies, database monitoring, auditing policies, and operational procedures before deploying automated scheduling workloads in production environments. Regular testing, validation, and maintenance of scheduled tasks are recommended to ensure reliability, security, performance, and business continuity. Organizations should review scheduled jobs, access permissions, and database configurations regularly to maintain compliance with operational and security best practices.