<?php
/** Daily reconciliation cron — runs at 2:30am */
require_once __DIR__ . '/../config.php';
require_once __DIR__ . '/../engine/ReconciliationEngine.php';
require_once __DIR__ . '/../engine/BankAdapter.php';

$date   = date('Y-m-d', strtotime('yesterday'));
$result = ReconciliationEngine::run($date);
echo date('Y-m-d H:i:s') . " Reconcile $date: " . $result['status'] .
     " mismatches=" . $result['mismatch_count'] . "\n";
