#!/bin/bash

# Remove Agenda Informe Cron Job

echo ""
echo "Removing Agenda Informe from Cron..."
echo ""

# Get script directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Remove from crontab
crontab -l 2>/dev/null | grep -v "$SCRIPT_DIR/run.sh\|agenda_simple.py" | crontab -

if ! crontab -l 2>/dev/null | grep -q "$SCRIPT_DIR/run.sh"; then
    echo "✅ Cron job removed successfully!"
    echo ""
    echo "The scraper will no longer run automatically."
else
    echo "❌ Failed to remove cron job. Try:"
    echo "  crontab -e"
    echo "And manually remove the Agenda Informe line."
fi

echo ""
