Add alternative validation methods: SSH, HTTP, and Python script with Telegram

This commit is contained in:
2026-03-30 15:38:05 -04:00
parent d0fca63be2
commit 61a96d490c
5 changed files with 376 additions and 0 deletions

27
scripts/setup-cron.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Setup cron job for MQL settings monitoring
echo "Setting up cron job for MQL settings monitoring..."
# Check if python3 is available
if ! command -v python3 &> /dev/null; then
echo "ERROR: python3 not found"
exit 1
fi
# Create cron entry
CRON_CMD="0 */6 * * * cd /home/garfield/mql-trading-bots && python3 scripts/validate-and-notify.py >> /tmp/mql-validate.log 2>&1"
# Add to crontab
(crontab -l 2>/dev/null; echo "$CRON_CMD") | crontab -
echo "Cron job added: Runs every 6 hours"
echo "Logs: /tmp/mql-validate.log"
echo ""
echo "To configure Telegram notifications, set these environment variables:"
echo " export TELEGRAM_BOT_TOKEN='your_bot_token'"
echo " export TELEGRAM_CHAT_ID='your_chat_id'"
echo ""
echo "Add these to your ~/.bashrc to persist:"
echo " echo 'export TELEGRAM_BOT_TOKEN=\"your_token\"' >> ~/.bashrc"
echo " echo 'export TELEGRAM_CHAT_ID=\"your_id\"' >> ~/.bashrc"