# Phase 7.4 — cPanel queue runner (no supervisord required). # # Add ONE line to your cPanel cron jobs (Cron Jobs → Add New Cron Job). # It runs every minute, drains any pending jobs, and exits before the next # tick. Combined with `--stop-when-empty` this matches a long-lived worker # closely enough for low/medium traffic; switch to supervisord on VPS hosts # when sustained throughput grows. # # Path conventions assume cPanel home is /home//public_html/astroayodhya-api. # Replace with your account name. * * * * * cd ~/public_html/astroayodhya-api && /usr/local/bin/php artisan queue:work --stop-when-empty --max-time=55 --tries=3 --timeout=120 >> ~/logs/queue.log 2>&1 # Phase 7.4 — Laravel scheduler (separate cron entry; required for the daily # ops digest, weekly transit alerts, etc.). * * * * * cd ~/public_html/astroayodhya-api && /usr/local/bin/php artisan schedule:run >> ~/logs/scheduler.log 2>&1 # Phase 7.4 — log rotation housekeeping. Laravel auto-rotates daily files, # but the `daily` driver only keeps `days => 14`; this catches stragglers. 0 3 * * * find ~/public_html/astroayodhya-api/storage/logs -name '*.log' -mtime +30 -delete # Phase 7.4 — Redis-backed sessions auto-expire, but if you ever switch to # the database driver, run this nightly to purge expired rows: # 30 3 * * * cd ~/public_html/astroayodhya-api && /usr/local/bin/php artisan session:gc >> ~/logs/session-gc.log 2>&1