# cmdsharp AI Server Cron Jobs # Add these to your server's crontab with: sudo crontab -e # Health check every 5 minutes - monitors queue processor, memory, disk */5 * * * * /var/www/html/proviska-ai/scripts/ai-health-check.sh # Pre-generate cache every 6 hours during low traffic (2am, 8am, 2pm, 8pm) 0 2,8,14,20 * * * php /var/www/html/proviska-ai/scripts/pregen-cache.php # Daily cache cleanup at 3 AM - removes expired files 0 3 * * * php /var/www/html/proviska-ai/scripts/cleanup-cache.php # Weekly optimization on Sunday at 2 AM - deep cache analysis and optimization 0 2 * * 0 php /var/www/html/proviska-ai/scripts/optimize-cache.php # Monthly log rotation and archiving - first day of month at 1 AM 0 1 1 * * find /var/www/html/proviska-ai/logs -name "*.log" -mtime +30 -exec gzip {} \; # Emergency disk space cleanup if > 90% full - every hour 0 * * * * [ $(df /var/www/html/proviska-ai | awk 'NR==2 {print $(NF-1)}' | sed 's/%//') -gt 90 ] && php /var/www/html/proviska-ai/scripts/cleanup-cache.php # Restart queue processor daily at 4 AM to prevent memory leaks 0 4 * * * pkill -f "queue-processor.php"; sleep 5; /var/www/html/proviska-ai/scripts/ai-health-check.sh