diff --git a/bin/cron.php b/bin/cron.php index 0dd3efe83c96326e0887e10375fc2b97acf271c3..1d36246debd564e984690fd1bf3bdeac87e364b9 100644 --- a/bin/cron.php +++ b/bin/cron.php @@ -4,9 +4,21 @@ * External execution */ - define('QUIQQER_SYSTEM', true); require dirname(dirname(dirname(dirname(__FILE__)))) . "/header.php"; -$Cron = new \QUI\Cron\Manager(); -$Cron->execute(); +use \Symfony\Component\HttpFoundation\Response; + +$Cron = new QUI\Cron\Manager(); +$Response = QUI::getGlobalResponse(); + +try { + $Cron->execute(); + + $Response->setStatusCode(Response::HTTP_OK); + $Response->send(); + +} catch (QUI\Exception $Exception) { + $Response->setStatusCode(Response::HTTP_SERVICE_UNAVAILABLE); + $Response->send(); +}