从postgresql数据库定期运行查询(ala crontab)

从postgresql数据库定期运行查询(ala crontab),第1张

概述我试图在 postgresql数据库表中复制(一个最小的)crontab功能,具有类似crontab的语义,如下所示(索引未显示,为simiplicity): create table schedule (id int not null primary key,command text);create table schedule_detail(schedule_id int not 我试图在 postgresql数据库表中复制(一个最小的)crontab功能,具有类似crontab的语义,如下所示(索引未显示,为simiplicity):
create table schedule (ID int not null primary key,command text);create table schedule_detail(schedule_ID int not null references schedule(ID),sd_minute smallint not null,sd_hour smallint not null,sd_day smallint not null,sd_month smallint not null,sd_year smallint not null,sd_dayofweek smallint not null);

我只有架构设计.我想了解如何实现这一点.特别是,如何实现:

>计划表的“定期轮询”
>如何确定要运行的计划

postgresql是否具有我可以构建的任何本机(内置)功能来实现此行为?

pgAgent将完成这项工作.完整的设置可以在 Postgresonline.com找到. 总结

以上是内存溢出为你收集整理的从postgresql数据库定期运行查询(ala crontab)全部内容,希望文章能够帮你解决从postgresql数据库定期运行查询(ala crontab)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/1181568.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存