mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-30 20:28:26 +00:00
Sketch a scheduler for running periodic tasks
Periodic tasks are special in that they are usually kept around and started based on a schedule. A new component checks periodic tasks and submits them in the queue once they are due. In order to avoid duplicate periodic jobs, the tracker of a job is used to store the periodic job id. Each time a periodic task is due, it is first checked if there is a job running (or queued) for this task.
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
CREATE TABLE `periodic_task` (
|
||||
`id` varchar(254) not null primary key,
|
||||
`enabled` boolean not null,
|
||||
`task` varchar(254) not null,
|
||||
`group_` varchar(254) not null,
|
||||
`args` text not null,
|
||||
`subject` varchar(254) not null,
|
||||
`submitter` varchar(254) not null,
|
||||
`priority` int not null,
|
||||
`worker` varchar(254),
|
||||
`marked` timestamp,
|
||||
`timer` varchar(254) not null,
|
||||
`nextrun` timestamp not null,
|
||||
`created` timestamp not null
|
||||
);
|
Reference in New Issue
Block a user