# Collection scheduler diagnostics

The backend scheduler uses UTC. The admin audit page explicitly displays Africa/Lagos (UTC+1), independent of the viewer's device timezone. Six-hour checks use cron `0 */6 * * *`: 00:00, 06:00, 12:00, 18:00 UTC / 01:00, 07:00, 13:00, 19:00 Lagos. This is a fixed clock schedule, not six hours after saving a setting. Keep backend timestamps in UTC.

API commit `1dd3cf6696a0e69a4f135f8b61ccd69e22af09b4` (13 May 2026) replaced fixed 15-minute collection with the configurable `loan_check_interval` and a six-hour fallback. Its commit message does not establish a business reason for six hours.

Read-only checks on the production host:

- `php artisan app:show-scheduler`: saved interval, local override, timezone, and actual registered schedule. Previous versions incorrectly reported a fixed 15-minute production interval.
- Inspect the hosting cron configuration: Laravel's `schedule:run` should be invoked every minute. Capture its stdout/stderr in a retained, rotated cron log; application logs cannot record a PHP process that never starts or fails before application boot.
- Search application logs for `Scheduler invocation`, `Scheduled task lifecycle`, and `Scheduled task failed`. Invocation records include UTC/Lagos timestamps, host/PID, environment, configured interval, maintenance mode, due task expressions and overlap-lock observations. Lifecycle records include task start/finish/skip/failure, exit code, runtime and lock observations. These logs follow the application's configured log level and retention policy.

For the missing 9 October 2026 07:00 Lagos slot, inspect existing cron/application logs at 06:00 UTC. New diagnostics cannot retrospectively establish its cause. Missing invocation points toward cron/process availability or startup errors; a due task with a lock suggests overlap prevention; failures identify execution errors. Lock observations are snapshots, not proof of the final skip reason. Maintenance mode can exclude tasks from the due list. An invocation alone does not prove task completion. Do not run collection manually or clear overlap locks merely to diagnose a missed slot: those actions can trigger debits.

The audit page records collection jobs and cool-off resets, rather than every scheduler invocation. A zero-item collection still creates a run row; a cool-off reset is a separate daily task. The configured interval does not govern every other scheduled loan-related job.
