26 include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
49 $this->family =
"base";
51 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
52 $this->
description =
"Enable the Dolibarr cron service";
54 $this->version =
'dolibarr';
56 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
58 $this->picto =
'technic';
61 $this->dirs = array();
65 $this->config_page_url = array(
"cron.php@cron");
69 $this->hidden = !empty($conf->global->MODULE_CRON_DISABLED);
70 $this->depends = array();
71 $this->requiredby = array();
72 $this->conflictwith = array();
73 $this->langfiles = array(
"cron");
90 $this->tabs = array();
95 0 => array(
'file' =>
'box_scheduled_jobs.php',
'enabledbydefaulton' =>
'Home')
99 $this->cronjobs = array(
100 0=>array(
'entity'=>0,
'label'=>
'PurgeDeleteTemporaryFilesShort',
'jobtype'=>
'method',
'class'=>
'core/class/utils.class.php',
'objectname'=>
'Utils',
'method'=>
'purgeFiles',
'parameters'=>
'',
'comment'=>
'PurgeDeleteTemporaryFiles',
'frequency'=>2,
'unitfrequency'=>3600 * 24 * 7,
'priority'=>50,
'status'=>1,
'test'=>
true),
101 1=>array(
'entity'=>0,
'label'=>
'MakeLocalDatabaseDumpShort',
'jobtype'=>
'method',
'class'=>
'core/class/utils.class.php',
'objectname'=>
'Utils',
'method'=>
'dumpDatabase',
'parameters'=>
'none,auto,1,auto,10',
'comment'=>
'MakeLocalDatabaseDump',
'frequency'=>1,
'unitfrequency'=>3600 * 24 * 7,
'priority'=>90,
'status'=>0,
'test'=>in_array($this->
db->type, array(
'mysql',
'mysqli'))),
106 $this->rights = array();
107 $this->rights_class =
'cron';
110 $this->rights[$r][0] = 23001;
111 $this->rights[$r][1] =
'Read cron jobs';
112 $this->rights[$r][3] = 0;
113 $this->rights[$r][4] =
'read';
116 $this->rights[$r][0] = 23002;
117 $this->rights[$r][1] =
'Create cron Jobs';
118 $this->rights[$r][3] = 0;
119 $this->rights[$r][4] =
'create';
122 $this->rights[$r][0] = 23003;
123 $this->rights[$r][1] =
'Delete cron Jobs';
124 $this->rights[$r][3] = 0;
125 $this->rights[$r][4] =
'delete';
128 $this->rights[$r][0] = 23004;
129 $this->rights[$r][1] =
'Execute cron Jobs';
130 $this->rights[$r][3] = 0;
131 $this->rights[$r][4] =
'execute';
136 $this->menu[$r] = array(
'fk_menu'=>
'fk_mainmenu=home,fk_leftmenu=admintools',
139 'url'=>
'/cron/list.php?leftmenu=admintools',
142 'enabled'=>
'$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',
143 'perms'=>
'$user->rights->cron->read',
</td > param sortfield sortorder printFieldListOption< tdclass="liste_titremaxwidthsearchright"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration center DesiredStock p desiredstock right StockLimitShort p seuil_stock_alerte right stock_physique right stock_real_warehouse right Ordered right StockToBuy right SupplierRef right param sortfield sortorder printFieldListTitle warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow StockTooLow help help help< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"> stock</td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
__construct($db)
Constructor.
$conf db name
Only used if Module[ID]Name translation string is not found.
$conf db
API class for accounts.
Class to describe a Cron module.