#!/usr/bin/php 0){ foreach ($tasks as $taskName){ try { if ($taskName::isActive()){ LoggingFacilityManager::getLogger("task")->log(LoggingFacility::$LEVEL_INFO,"Executing task '".$taskName::getLabel()."' "); $taskName::execute(); LoggingFacilityManager::getLogger("task")->log(LoggingFacility::$LEVEL_INFO,"Task '".$taskName::getLabel()."' completed successfully"); } }catch (CoreException $ex){ $msg = "Error while executing task '".$taskName::getLabel()."' with message '".$ex->getMessage()."'"; LoggingFacilityManager::getLogger("task")->log(LoggingFacility::$LEVEL_ERROR,$msg); } catch (Exception $ex){ $msg = "Unexpected error while executing task '".$taskName::getLabel()."' with message '".$ex->getMessage()."'"; LoggingFacilityManager::getLogger("task")->log(LoggingFacility::$LEVEL_ERROR,$msg); } } } // try { // }catch (UNHADBException $unex){ // $msg = $application->core->loggingCatalogManager->getCatalog($unex->getMessage(),$unex->getData()); // LoggingFacilityManager::getLogger("task")->log(LoggingFacility::$LEVEL_ERROR,"log.task.errorWhileExecutingTask",array("ProcessMailQueue.php",$msg),true); // } // catch (Exception $ex){ // $msg = $application->core->loggingCatalogManager->getCatalog($ex->getMessage()); // LoggingFacilityManager::getLogger("task")->log(LoggingFacility::$LEVEL_ERROR,"log.task.errorWhileExecutingTask",array("ProcessMailQueue.php",$msg),true); // } ?>