百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

pg_timetable

> 前端框架
开源

pg_timetable: PostgreSQL 的高级调度

1.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

pg_timetable: PostgreSQL 的高级调度

pg_timetable: Advanced scheduling for PostgreSQL

pg_timetable is an advanced standalone job scheduler for PostgreSQL, offering many advantages over traditional schedulers such as cron and others. It is completely database driven and provides a couple of advanced concepts. It allows you to schedule PostgreSQL commands, system programs and built-in operations:

…

Documentation

https://cybertec-postgresql.github.io/pg_timetable/

Main features

  • Tasks can be arranged in chains
  • Each task executes SQL, built-in or executable command
  • Parameters can be passed to tasks
  • Missed chains (possibly due to downtime) can be retried automatically
  • Support for configurable repetitions
  • Builtin tasks such as sending emails, downloading, importing files, etc.
  • Fully database driven configuration
  • Full support for database driven logging
  • Enhanced cron-style scheduling
  • Optional concurrency protection
  • Chain and task definitions can be enabled or disabled without deleting them
  • YAML-based chain definitions for easy configuration
  • OpenTelemetry tracing and metrics export (opt-in)
  • Official Docker images published for both linux/amd64 and linux/arm64

YAML Configuration

You can now define chains using YAML files instead of SQL inserts, making configuration more readable and maintainable:

chains:
  - name: "Daily ETL Pipeline"
    schedule: "0 2 * * *"  # 2 AM daily
    live: true
    max_instances: 1
    timeout: 3600000  # 1 hour
    
    tasks:
      - name: "Extract data"
        command: "SELECT extract_sales_data($1)"
        parameters: ["yesterday"]
        
      - name: "Transform data"
        command: "CALL transform_sales_data()"
        autonomous: true
        
      - name: "Load to warehouse"
        command: "CALL load_to_warehouse()"

Load YAML chains with one or more startup files:

pg_timetable --file chains.yaml postgresql://user:pass@host/db
pg_timetable --file bootstrap.sql --file chains/base.yaml --file chains/prod.yaml ******host/db

See samples/yaml/ for more examples and YAML Schema for complete format specification.

Installation

Complete installation guide can be found in the documentation.

Possible choices are:

  • official release packages;
  • Docker images;
  • build from sources.

Quick Start

Complete usage guide can be found in the documentation.

  1. Download pg_timetable executable

  2. Make sure your PostgreSQL server is up and running and has a role with CREATE privilege for a target database, e.g.

    my_database=> CREATE ROLE scheduler PASSWORD 'somestrong';
    my_database=> GRANT CREATE ON DATABASE my_database TO scheduler;
    
  3. Create a new job, e.g. run VACUUM each night at 00:30

    my_database=> SELECT timetable.add_job('frequent-vacuum', '30 0 * * *', 'VACUUM');
    add_job
    ---------
        3
    (1 row)
    
  4. Run the pg_timetable

    pg_timetable postgresql://scheduler:somestrong@localhost/my_database --clientname=vacuumer
    
  5. PROFIT!

Supported Environments

Cloud Service Supported PostgreSQL Version Supported OS Supported
Alibaba Cloud ✅ 19 (devel) ✅ Linux ✅
Amazon RDS ✅ 18 (current) ✅ Darwin ✅
Amazon Aurora ✅ 17 ✅ Windows ✅
Azure ✅ 16 ✅ FreeBSD* ✅
Citus Cloud ✅ 15 ✅ NetBSD* ✅
Crunchy Bridge ✅ 14 ✅ OpenBSD* ✅
DigitalOcean ✅ 13 ✅ Solaris* ✅
Google Cloud ✅ 12 ✅
Heroku ✅ 11 ✅
Supabase ✅ 10 ✅

* - there are no official release binaries made for these OSes. One would need to build them from sources.

** - previous PostgreSQL versions may and should work smoothly. Only officially supported PostgreSQL versions are listed in this table.

Contributing

If you want to contribute to pg_timetable and help make it better, feel free to open an issue or even consider submitting a pull request.

Support

For professional support, please contact Cybertec.

Authors

  • Implementation: Pavlo Golub
  • Initial idea and draft design: Hans-Jürgen Schönig

Star History

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gochainscrondatabasedocker-image

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架