# ============================================
# CRON JOBS FOR HOMOEOPATHY SYSTEM
# ============================================
# Add these to your crontab: crontab -e
# ============================================

# Daily at midnight - Check expired subscriptions
0 0 * * * /usr/bin/php /var/www/html/scripts/check-subscriptions.php >> /var/www/html/logs/cron.log 2>&1

# Daily at 9 AM - Send follow-up reminders
0 9 * * * /usr/bin/php /var/www/html/scripts/send-reminders.php >> /var/www/html/logs/cron.log 2>&1

# Daily at 2 AM - Database backup
0 2 * * * /usr/bin/php /var/www/html/scripts/backup-database.php >> /var/www/html/logs/cron.log 2>&1

# Weekly on Sunday at 3 AM - Optimize database
0 3 * * 0 /usr/bin/php /var/www/html/scripts/optimize-database.php >> /var/www/html/logs/cron.log 2>&1

# Weekly on Monday at 4 AM - Generate sitemap
0 4 * * 1 /usr/bin/php /var/www/html/scripts/generate-sitemap.php >> /var/www/html/logs/cron.log 2>&1

# Every hour - Clean temp files
0 * * * * find /var/www/html/tmp/ -type f -mtime +1 -delete >> /var/www/html/logs/cron.log 2>&1

# ============================================
# EXAMPLE FOR SPECIFIC PATHS:
# ============================================
# If PHP is in different location, find with: which php
# For shared hosting: /usr/local/bin/php
# For XAMPP (Windows): C:\xampp\php\php.exe

# ============================================
# TEST CRON JOBS:
# ============================================
# Run manually: php /var/www/html/scripts/check-subscriptions.php
# Check logs: tail -f /var/www/html/logs/cron.log