2
0
forked from Wavyzz/dolibarr

Add pid integer column to llx_cronjob

Store the PID of the cronjob to allow cleanup if the process is no longer present in the system
This commit is contained in:
Florian Charlaix
2022-08-18 15:08:47 +02:00
parent e575abfa94
commit c5b43fc7df
2 changed files with 3 additions and 0 deletions

View File

@@ -84,3 +84,5 @@ ALTER TABLE llx_societe ADD last_main_doc VARCHAR(255) NULL AFTER model_pdf;
ALTER TABLE llx_ticket ADD COLUMN ip varchar(250);
ALTER TABLE llx_ticket ADD email_date datetime after email_msgid;
ALTER TABLE llx_cronjob ADD COLUMN pid integer;

View File

@@ -47,6 +47,7 @@ CREATE TABLE llx_cronjob
autodelete integer DEFAULT 0, -- 0=Job is kept unchanged once nbrun > maxrun or date > dateend, 2=Job must be archived (archive = status 2) once nbrun > maxrun or date > dateend
status integer NOT NULL DEFAULT 1, -- 0=disabled, 1=enabled, 2=archived
processing integer NOT NULL DEFAULT 0, -- 1=process currently running
pid integer, -- The cronjob PID, NULL if not in processing
test varchar(255) DEFAULT '1',
fk_user_author integer DEFAULT NULL,
fk_user_mod integer DEFAULT NULL,