# /etc/cron.d/greenathon
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

# Laravel scheduler: reconciliation (15 min), expiry (hourly), reminders (09:00),
# anonymisation (03:30). The queue itself runs under Supervisor.
* * * * *   greenathon  cd /var/www/greenathon/current && php artisan schedule:run >> /dev/null 2>&1

# Backups to S3: nightly. During registration week, switch to the hourly line.
30 2 * * *  greenathon  /usr/local/bin/greenathon-backup >> /var/www/greenathon/shared/storage/logs/backup.log 2>&1
# 15 * * * * greenathon  /usr/local/bin/greenathon-backup >> /var/www/greenathon/shared/storage/logs/backup.log 2>&1

# Refresh Cloudflare's IP ranges for nginx's real-IP module (monthly).
17 4 1 * *  root        /usr/local/bin/greenathon-cloudflare-ips >> /var/log/greenathon-cloudflare-ips.log 2>&1
