# =============================================================================
# Obol node crontab — install with:
#   sudo -u ethereum crontab /home/ethereum/.obol-monitor/crontabs/obol-crontab
# Or merge into existing crontab with:
#   sudo -u ethereum crontab -e
# =============================================================================

SHELL=/bin/bash
PATH=/home/ethereum/.npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOME=/home/ethereum
USER=ethereum

# Health check — every 5 minutes
*/5 * * * * /usr/share/staking-monitor/obol-monitor/scripts/obol-health.sh >> /home/ethereum/.obol-monitor/logs/obol-health.log 2>&1

# Weekly status report — every Monday at 08:00
0 8 * * 1 /usr/share/staking-monitor/obol-monitor/scripts/obol-status.sh >> /home/ethereum/.obol-monitor/logs/obol-status.log 2>&1

# Rotate logs weekly — keep last 4 weeks
0 3 * * 0 find /home/ethereum/.obol-monitor/logs -name "*.log" -mtime +28 -delete 2>/dev/null

# Package update check — daily at 09:00
0 9 * * * /usr/share/staking-monitor/obol-monitor/scripts/check-updates.sh >> /home/ethereum/.obol-monitor/logs/check-updates.log 2>&1