• Mahmoud Aglan's avatar
    fix(cron): the scheduled-job subsystem has never run, and gate it before it does · cd771856
    Mahmoud Aglan authored
    cron/runner.php writes a cron_job_log row before every eligible job. That table
    does not exist, so the runner threw on the first job with shouldRun() === true
    and none of the 43 scheduled jobs has ever executed: subscription generation,
    instalment default handling, activity-subscription revocation, academy
    settlements, coach payroll, monthly depreciation, and every expiry reminder.
    
    The container's crontab is present and cron is running — the hourly entry has
    been firing into an immediate exception the whole time, which is why
    storage/logs/cron.log does not exist.
    
    Creating the table alone would be reckless the night before a finance review:
    the crontab fires hourly, so all 43 would start on the next tick, and several
    write off receivables, impose fines, drop memberships and auto-complete waivers
    (which now post accrual entries). So the runner is additionally gated behind
    system_config.cron_enabled, seeded to 0.
    
    Turn it on from Settings when someone can watch the first run. Until then the
    runner exits with a clear message rather than pretending to work.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    cd771856
Phase_102_001_create_cron_job_log.php 1.79 KB