24h compile & emails — no server-time dependency

The script does not check server time. It runs whenever it is invoked (cron, browser, or CLI). Compile and all emails run every time. Schedule cron once per day at whatever time you want (e.g. 23:59 Addis so "yesterday" is the day that just closed).

Addis Ababa now: 2026-04-17 21:54:25 (UTC+3)
Suggested cron (once per day):
59 23 * * * cd "/home/afrinerr/domains/afrinex.shop/public_html/api-backend/admin" && php cron-end-of-day-compile.php >> "/home/afrinerr/domains/afrinex.shop/public_html/api-backend/admin/payment-archives/cron-compile.log" 2>&1

If server is UTC, use 59 20 * * * (20:59 UTC = 23:59 Addis). setup-end-of-day-cron.php shows the exact line for your path.

Setup cron · View Payment Archive