- don't drop TABLE_PANEL_DISKSPACE and TABLE_PANEL_DISKSPACE_ADMINS (used in traffic-cron);
- using correct variable for sql-query in getNextCronjobs(); - let includeCronjobs() return the list of crons to run because of all the global variables; - include required classes/functions to cronfiles;
This commit is contained in:
@@ -15,23 +15,24 @@
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
function includeCronjobs($debugHandler)
|
||||
function includeCronjobs($debugHandler, $pathtophpfiles)
|
||||
{
|
||||
$cronjobs = getNextCronjobs();
|
||||
|
||||
$jobs_to_run = array();
|
||||
|
||||
if($cronjobs !== false
|
||||
&& is_array($cronjobs)
|
||||
&& isset($cronjobs[0]))
|
||||
{
|
||||
/*
|
||||
* @TODO find a better way for the path
|
||||
*/
|
||||
$cron_path = dirname(__FILE__).'/../../../scripts/jobs/';
|
||||
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
|
||||
|
||||
foreach($cronjobs as $cronjob)
|
||||
{
|
||||
$cron_file = makeCorrectFile($cron_path.$cronjob);
|
||||
include_once($cron_file);
|
||||
$jobs_to_run[] = $cron_file;
|
||||
}
|
||||
}
|
||||
|
||||
return $jobs_to_run;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user