从postgresql数据库定期运行查询(ala crontab)
发布时间:2020-12-13 18:07:05 所属栏目:百科 来源:网络整理
导读:我试图在 postgresql数据库表中复制(一个最小的)crontab功能,具有类似crontab的语义,如下所示(索引未显示,为simiplicity): create table schedule (id int not null primary key,command text);create table schedule_detail(schedule_id int not null refe
我试图在
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找到.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |