New functionality for add cronjob (#28282)

This commit is contained in:
lamrani abdelwadoud
2024-02-20 00:44:09 +01:00
committed by GitHub
parent 009c93f75a
commit 2c8a2e5f61
3 changed files with 18 additions and 3 deletions

View File

@@ -133,7 +133,20 @@ class modProjet extends DolibarrModules
3=>array('file'=>'box_validated_projects.php', 'enabledbydefaulton'=>'Home'), // task without timespent
4=>array('file'=>'box_funnel_of_prospection.php', 'enabledbydefaulton'=>'Home'),
);
// Cronjobs
$this->cronjobs[] = array(
'label' => 'WeeklyWorkingHoursReport',
'jobtype' => 'method',
'class' => 'projet/class/project.class.php',
'objectname' => 'Project',
'method' => 'createWeeklyReport',
'parameters' => '',
'comment' => 'Generates and sends a weekly report on time worked',
'frequency' => 1,
'unitfrequency' => 86400 * 7,
'status' => 0,
'test' => '$conf->projet->enabled',
);
// Permissions
$this->rights = array();
$this->rights_class = 'projet';