<?php

file_put_contents(
    __DIR__.'/cron_test.log',
    "1 - Cron started ".date('Y-m-d H:i:s')."\n",
    FILE_APPEND
);

require_once __DIR__ . '/bootstrap.php';

file_put_contents(
    __DIR__.'/cron_test.log',
    "2 - Bootstrap loaded\n",
    FILE_APPEND
);

$manager = new CronManager($pdo);

file_put_contents(
    __DIR__.'/cron_test.log',
    "3 - Manager created\n",
    FILE_APPEND
);

$manager->run();

file_put_contents(
    __DIR__.'/cron_test.log',
    "4 - Cron finished\n",
    FILE_APPEND
);