Install
openclaw skills install gateway-auto-fixAutomatically monitor OpenClaw gateway status and fix when RPC probe fails. Uses OpenClaw cron system - just install and it works!
openclaw skills install gateway-auto-fixThis skill automatically monitors the OpenClaw gateway and fixes it when the RPC probe fails. It uses OpenClaw's built-in cron system for scheduling.
openclaw gateway status every minuteopenclaw doctor --fix to fix config issuesopenclaw gateway restart to restart the gateway/tmp/openclaw-auto-fix.lognpx clawhub install gateway-auto-fix
That's it! The skill will:
# 1. Copy the script to workspace
mkdir -p ~/.openclaw-it/workspace
cp /path/to/gateway-auto-fix/openclaw-auto-fix.sh ~/.openclaw-it/workspace/
# 2. Make executable
chmod +x ~/.openclaw-it/workspace/openclaw-auto-fix.sh
# 3. Add OpenClaw cron job
openclaw cron add \
--name "gateway-auto-fix" \
--every "1m" \
--message "Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh" \
--no-deliver
# Remove cron job
openclaw cron rm gateway-auto-fix
# Remove script
rm ~/.openclaw-it/workspace/openclaw-auto-fix.sh
openclaw cron list
openclaw cron status
tail -f /tmp/openclaw-auto-fix.log
~/.openclaw-it/workspace/openclaw-auto-fix.sh
# Or via OpenClaw cron
openclaw cron run gateway-auto-fix
openclaw cron status
openclaw gateway status
openclaw cron run gateway-auto-fix
~/.openclaw-it/workspace/openclaw-auto-fix.sh/tmp/openclaw-auto-fix.log# Remove old job
openclaw cron rm gateway-auto-fix
# Add new job with different interval (e.g., 5 minutes)
openclaw cron add \
--name "gateway-auto-fix" \
--every "5m" \
--message "Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh" \
--no-deliver
# Step 1: Create workspace
mkdir -p ~/.openclaw-it/workspace
# Step 2: Create the script
cat > ~/.openclaw-it/workspace/openclaw-auto-fix.sh << 'EOF'
#!/bin/bash
LOG_FILE="/tmp/openclaw-auto-fix.log"
echo "=== $(date) ===" >> $LOG_FILE
STATUS_OUTPUT=$(openclaw gateway status 2>&1)
echo "$STATUS_OUTPUT" >> $LOG_FILE
if echo "$STATUS_OUTPUT" | grep -q "RPC probe: failed"; then
echo "RPC probe FAILED! Running auto-fix..." >> $LOG_FILE
openclaw doctor --fix 2>&1 >> $LOG_FILE
openclaw gateway restart 2>&1 >> $LOG_FILE
echo "Auto-fix completed at $(date)" >> $LOG_FILE
else
echo "Gateway is healthy" >> $LOG_FILE
fi
echo "---" >> $LOG_FILE
EOF
# Step 3: Make executable
chmod +x ~/.openclaw-it/workspace/openclaw-auto-fix.sh
# Step 4: Add OpenClaw cron job
openclaw cron add \
--name "gateway-auto-fix" \
--every "1m" \
--message "Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh" \
--no-deliver
# Step 5: Verify
openclaw cron list