2020-11-29 05:05:08 +00:00
|
|
|
CREATE TABLE cron (
|
|
|
|
jobName varchar UNIQUE NOT NULL, -- Application-recognizable name for the job
|
|
|
|
runinterval interval NOT NULL, -- Duration between runs
|
|
|
|
-- Last successful run - only gets updated if run is successful
|
|
|
|
lastSuccess timestamptz DEFAULT to_timestamp(0), -- Defaults to beginning of time
|
|
|
|
PRIMARY KEY(jobName)
|
|
|
|
);
|
|
|
|
|
|
|
|
INSERT INTO cron (jobName,runInterval) VALUES
|
|
|
|
('processBans','30 minutes'),
|
2021-02-25 02:40:58 +00:00
|
|
|
('processFollows','30 minutes'),
|
|
|
|
('processSubscriptions','30 minutes'),
|
2020-11-29 05:05:08 +00:00
|
|
|
('processEmptyMetadata','1 day');
|