print@date('d.m.Y-H:i').' - WARNING - There is already an instance of server.php running with pid '.$pid.'.'."\n";
if($conf['log_priority']<=LOGLEVEL_WARN)print@date('d.m.Y-H:i').' - WARNING - There is already an instance of server.php running with pid '.$pid.'.'."\n";
exit;
exit;
}
}
}
}
print@date('d.m.Y-H:i').' - WARNING - There is already a lockfile set, but no process running with this pid ('.$pid.'). Continuing.'."\n";
if($conf['log_priority']<=LOGLEVEL_WARN)print@date('d.m.Y-H:i').' - WARNING - There is already a lockfile set, but no process running with this pid ('.$pid.'). Continuing.'."\n";
}
}
// Set Lockfile
// Set Lockfile
...
@@ -90,15 +90,15 @@ foreach($files as $f) {
...
@@ -90,15 +90,15 @@ foreach($files as $f) {
if(class_exists($class_name,false)){
if(class_exists($class_name,false)){
$cronjob=new$class_name();
$cronjob=new$class_name();
if(get_parent_class($cronjob)!=='cronjob'){
if(get_parent_class($cronjob)!=='cronjob'){
print'Invalid class '.$class_name.' not extending class cronjob ('.get_parent_class($cronjob).')!'."\n";
if($conf['log_priority']<=LOGLEVEL_WARN)print'Invalid class '.$class_name.' not extending class cronjob ('.get_parent_class($cronjob).')!'."\n";
unset($cronjob);
unset($cronjob);
continue;
continue;
}
}
print'Included '.$class_name.' from '.$path.'/'.$f.' -> will now run job.'."\n";
if($conf['log_priority']<=LOGLEVEL_DEBUG)print'Included '.$class_name.' from '.$path.'/'.$f.' -> will now run job.'."\n";