collect more info for the customer-dashboard (part 1/2); check for existance of cronjob (just in case)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-10-27 18:42:40 +01:00
parent 5d4448b659
commit b618e86512
2 changed files with 20 additions and 8 deletions

View File

@@ -60,21 +60,24 @@ function getNextCronjobs()
function includeCronjobs($debugHandler, $pathtophpfiles)
{
global $settings, $theme;
global $settings, $theme, $cronlog;
$cronjobs = getNextCronjobs();
$jobs_to_run = array();
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
if($cronjobs !== false
&& is_array($cronjobs)
&& isset($cronjobs[0]))
{
foreach($cronjobs as $cronjob)
{
if ($cronjobs !== false
&& is_array($cronjobs)
&& isset($cronjobs[0])
) {
foreach ($cronjobs as $cronjob) {
$cron_file = makeCorrectFile($cron_path.$cronjob);
$jobs_to_run[] = $cron_file;
if (!file_exists($cron_file)) {
$cronlog->logAction(CRON_ACTION, LOG_ERROR, 'Wanted to include cronfile "'.$cron_file.'" but this file does not exist!!!');
} else {
$jobs_to_run[] = $cron_file;
}
}
}