diff --git a/src/bb-modules/Cron/Service.php b/src/bb-modules/Cron/Service.php index d19f5bc7b..8ba6dd2c8 100644 --- a/src/bb-modules/Cron/Service.php +++ b/src/bb-modules/Cron/Service.php @@ -10,7 +10,6 @@ * with this source code in the file LICENSE */ - namespace Box\Mod\Cron; class Service @@ -86,8 +85,12 @@ class Service { try { $api->{$method}($params); - } catch(\Exception $e) { - error_log($e); + } catch(Exception $e) { + throw new Exception($e); + } finally { + if (php_sapi_name() == 'cli') { + print ("\e[32mSuccessfully ran " . $method . "(" . $params . ")" . ".\e[0m\n"); + } } } @@ -107,4 +110,4 @@ class Service $t2 = new \DateTime('-6min'); return ($t1 < $t2); } -} \ No newline at end of file +}