llx_cronjob.sql 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. -- ===================================================================
  2. -- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
  3. -- Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
  4. --
  5. -- This program is free software; you can redistribute it and/or modify
  6. -- it under the terms of the GNU General Public License as published by
  7. -- the Free Software Foundation; either version 3 of the License, or
  8. -- (at your option) any later version.
  9. --
  10. -- This program is distributed in the hope that it will be useful,
  11. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. -- GNU General Public License for more details.
  14. --
  15. -- You should have received a copy of the GNU General Public License
  16. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. --
  18. -- ===================================================================
  19. CREATE TABLE llx_cronjob
  20. (
  21. rowid integer AUTO_INCREMENT PRIMARY KEY,
  22. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  23. datec datetime,
  24. jobtype varchar(10) NOT NULL, -- 'method', 'function' or 'command'
  25. label varchar(255) NOT NULL,
  26. command varchar(255),
  27. classesname varchar(255), -- when jobtype is 'method', name of the class file containing the method.
  28. objectname varchar(255),
  29. methodename varchar(255), -- name of method or function
  30. params text,
  31. md5params varchar(32),
  32. module_name varchar(255),
  33. priority integer DEFAULT 0,
  34. datelastrun datetime, -- date last run start (see datelastresult for end with a result)
  35. datenextrun datetime, -- job will be run if current date higher that this date
  36. datestart datetime, -- before this date no jobs will be run
  37. dateend datetime, -- after this date, no more jobs will be run
  38. datelastresult datetime, -- date last run end
  39. lastresult text,
  40. lastoutput text,
  41. unitfrequency varchar(255) NOT NULL DEFAULT '3600',
  42. frequency integer NOT NULL DEFAULT 0,
  43. maxrun integer NOT NULL DEFAULT 0, -- set this to 1 for a job queued for on run only
  44. nbrun integer, -- nb of run complete (failed or not)
  45. 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
  46. status integer NOT NULL DEFAULT 1, -- 0=disabled, 1=enabled, 2=archived
  47. processing integer NOT NULL DEFAULT 0, -- 1=process currently running
  48. pid integer, -- The cronjob PID, NULL if not in processing
  49. test varchar(255) DEFAULT '1',
  50. fk_user_author integer DEFAULT NULL,
  51. fk_user_mod integer DEFAULT NULL,
  52. fk_mailing integer DEFAULT NULL, -- id of emailing if job was queued to send mass emailing
  53. note text,
  54. libname varchar(255), -- when jobtype is 'function', name of the library file containing the function.
  55. email_alert varchar(128), -- email for alert
  56. entity integer DEFAULT 0
  57. )ENGINE=innodb;