getLastExecutionTime().".\e[0m"; } $service->runCrons($interval); } catch (Exception $exception) { throw new Exception($exception); } finally { if ('cli' == php_sapi_name()) { echo "\e[32mSuccessfully ran the cron jobs.\e[0m"; } else { $login_url = $di['url']->link('bb-admin'); unset($service, $interval, $di); header("Location: $login_url"); } }