#!/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); } } } ?>