Отладка скрипта cron PHP

<?php ini_set("display_errors",1); error_reporting(-1); set_include_path('root/push'); require_once('../../var/www/includes/database.php'); require_once('pushAPNS.php'); date_default_timezone_set('Europe/London'); $departure = (string)date('H:i'); $timeNow = "$departure:00"; class Journey {} try { // Get all UDIDs that need to be sent a notificaiton now $stmt = $conn->prepare("SELECT udid, bus.registration, vjc.vehicle_journey_reference, bus.line, `to`.operator_short_name AS operator, traveline.getDestinationFromJourney(vjc.vehicle_journey_reference) AS destination FROM push_request JOIN cron ON cron.time = :timeNow JOIN traveline.vehicle_journey_code vjc ON vjc.vehicle_journey_reference = cron.vehicle_journey_reference JOIN bus ON bus.journey = vjc.code JOIN traveline.operator `to` ON `to`.operator_code = bus.operator_code WHERE push_request.vehicle_journey_reference = vjc.vehicle_journey_reference"); $stmt->execute(array(':timeNow' => $timeNow)); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch(PDOException $e) { echo $e->getMessage(); } // Notify every UDID their journey is now trackable foreach ($results as $result) { $journey = new Journey(); $journey->operator = $result['operator']; $journey->line = $result['line']; $journey->departure = $departure; $journey->destination = $result['destination']; pushAPNS($result['udid'], $journey); } // Debugging $conn->query("INSERT INTO a (`time`) VALUES ('$timeNow')"); ?> 

Вышеупомянутый код выполняется каждую минуту на сервере cron. Код достигает последней строки каждый раз, когда запрос возвращает результат. Кажется, я не вижу ошибок в журнале ошибок PHP при выполнении скрипта, любые идеи, как я могу отладить это, чтобы исправить мою проблему?

Я должен добавить, что если я выполнил скрипт вручную, когда результаты будут возвращены, скрипт будет работать нормально. Это просто крона, которая не нравится результатам запроса

Crontab: * * * * * / usr / bin / php /root/push/sendPushNotifications.php