Aggiunte nuove mail al mail helper Correzioni grafiche alle pagine di cancellazione in amministrazione Modificata pagina di validazione commento
40 lines
1.7 KiB
PHP
40 lines
1.7 KiB
PHP
#!/usr/bin/php
|
|
<?php
|
|
require_once(dirname(__FILE__). "/../load.php");
|
|
|
|
$tasks = array("NewsletterCheckTask","DeleteOldPasswordResetRequestsTask", "UpdateMeteoCacheTask", "GenerateCommentiWarningMailTask");
|
|
|
|
if (sizeof($tasks)>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 {
|
|
// SystemController::executeTask("RefreshApiCache.php");
|
|
// }
|
|
// catch (UNHADBException $unex){
|
|
// $msg = $application->core->loggingCatalogManager->getCatalog($unex->getMessage(),$unex->getData());
|
|
// LoggingFacilityManager::getLogger("task")->log(LoggingFacility::$LEVEL_ERROR,"log.task.errorWhileExecutingTask",array("GenerateReminderMail.php",$msg),true);
|
|
|
|
// }
|
|
// catch (Exception $ex){
|
|
// $msg = $application->core->loggingCatalogManager->getCatalog($ex->getMessage());
|
|
// LoggingFacilityManager::getLogger("task")->log(LoggingFacility::$LEVEL_ERROR,"log.task.errorWhileExecutingTask",array("GenerateReminderMail.php",$msg),true);
|
|
|
|
// }
|
|
|
|
?>
|