# ============================================================================= # COG$ of Australia Foundation -- Canonical Crontab # ============================================================================= # # THIS FILE IS THE SINGLE SOURCE OF TRUTH for all cron jobs. # It lives in the repo at _app/monitoring/crontab.txt and is version-controlled. # # To install or update on the server, run from the repo root: # bash _app/monitoring/install-crontab.sh # # Server: cogsaust@shorty.serversaurus.com.au # Home: /home4/cogsaust/ # Web: /home4/cogsaust/public_html/ # # All logs write to /home4/cogsaust/logs/ -- ensure this directory exists. # Run once to create: mkdir -p /home4/cogsaust/logs # # Notifications: Telegram only. No email alerts. # ============================================================================= # -- Server health monitor ----------------------------------------------------- # Every 5 minutes. Watches Apache traffic, HTTP errors, PHP errors. # Sends Telegram alert only when thresholds breached. Silent otherwise. # Deduplicates alerts within 3600s window. */5 * * * * /home4/cogsaust/cogs-monitor.sh >> /home4/cogsaust/logs/monitor.log 2>&1 # -- Email queue processor ----------------------------------------------------- # Processes the email_queue table every 5 minutes. # Handles transactional emails (member onboarding, PIF invitations etc). */5 * * * * /usr/local/bin/php /home4/cogsaust/public_html/_app/api/cron-email.php >> /home4/cogsaust/logs/email-cron.log 2>&1 # -- Hub weekly digest --------------------------------------------------------- # Friday 18:00 AEST (08:00 UTC). Sends hub activity digest to hub members. 0 8 * * 5 /usr/local/bin/php /home4/cogsaust/public_html/_app/api/cron-hub-digest.php >> /home4/cogsaust/logs/hub-digest.log 2>&1 # -- Error digest -- hourly new-error alert ------------------------------------ # :05 past every hour. Telegram alert if new unacknowledged errors. Silent otherwise. 5 * * * * /usr/local/bin/php /home4/cogsaust/public_html/_app/api/cron-error-digest.php --mode=hourly >> /home4/cogsaust/logs/error-digest.log 2>&1 # -- Error digest -- daily summary --------------------------------------------- # 07:00 AEST daily (21:00 UTC). Telegram if any errors exist. Silent if clean. 0 21 * * * /usr/local/bin/php /home4/cogsaust/public_html/_app/api/cron-error-digest.php --mode=daily >> /home4/cogsaust/logs/error-digest.log 2>&1 # -- Lead capture notifier ----------------------------------------------------- # Every 30 minutes, all hours. Silent when no new leads — safe to run overnight. # Telegram only when new leads have arrived since last run. */30 * * * * /usr/local/bin/php /home4/cogsaust/public_html/_app/api/cron-lead-capture.php >> /home4/cogsaust/logs/lead-capture.log 2>&1