<?php
/**
 * Run every 5 minutes from cPanel > Cron Jobs (NFR-04):
 *   php /home/USER/app/cron/sla_engine.php >> /home/USER/app/storage/logs/sla_engine.log 2>&1
 */
require __DIR__ . '/../app/cron_bootstrap.php';

use App\Services\SlaEngine;

$summary = SlaEngine::evaluateAll();

echo date('Y-m-d H:i:s') . ' sla_engine: ' .
    "warned={$summary['warned']} breached={$summary['breached']} escalated={$summary['escalated']}" . PHP_EOL;
