返回顶部
g

gateway-auto-fix网关自动修复

Automatically monitor OpenClaw gateway status and fix when RPC probe fails. Uses OpenClaw cron system - just install and it works!

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 2.0.0
安全检测
已通过
492
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

gateway-auto-fix

技能名称: gateway-auto-fix

详细描述:

网关自动修复技能

概述

该技能自动监控 OpenClaw 网关,并在 RPC 探测失败时进行修复。它使用 OpenClaw 内置的定时任务系统进行调度。

功能说明

  1. 1. 每分钟检查 openclaw gateway status
  2. 检测输出中是否包含 RPC probe: failed
  3. 自动执行:
- openclaw doctor --fix 修复配置问题 - openclaw gateway restart 重启网关
  1. 4. 将所有操作记录到 /tmp/openclaw-auto-fix.log

快速安装(自动)

bash
npx clawhub install gateway-auto-fix

安装完成!该技能将:

  • - ✅ 添加 OpenClaw 定时任务(每1分钟)
  • ✅ 创建脚本
  • ✅ 开始监控

手动安装(如无法使用 ClawHub)

bash

1. 将脚本复制到工作空间


mkdir -p ~/.openclaw-it/workspace
cp /path/to/gateway-auto-fix/openclaw-auto-fix.sh ~/.openclaw-it/workspace/

2. 赋予执行权限

chmod +x ~/.openclaw-it/workspace/openclaw-auto-fix.sh

3. 添加 OpenClaw 定时任务

openclaw cron add \ --name gateway-auto-fix \ --every 1m \ --message Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh \ --no-deliver

手动卸载

bash

移除定时任务


openclaw cron rm gateway-auto-fix

删除脚本

rm ~/.openclaw-it/workspace/openclaw-auto-fix.sh

使用方法

检查定时任务状态

bash openclaw cron list openclaw cron status

查看日志

bash tail -f /tmp/openclaw-auto-fix.log

手动运行

bash ~/.openclaw-it/workspace/openclaw-auto-fix.sh

或通过 OpenClaw 定时任务

openclaw cron run gateway-auto-fix

故障排除

检查定时任务是否运行:

bash openclaw cron status

检查网关:

bash openclaw gateway status

手动运行:

bash openclaw cron run gateway-auto-fix

创建的文件

  • - 脚本:~/.openclaw-it/workspace/openclaw-auto-fix.sh
  • 日志:/tmp/openclaw-auto-fix.log
  • 定时任务:OpenClaw 内置(每1分钟)

配置

更改执行间隔

bash

移除旧任务


openclaw cron rm gateway-auto-fix

添加新任务,设置不同间隔(例如5分钟)

openclaw cron add \ --name gateway-auto-fix \ --every 5m \ --message Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh \ --no-deliver

完整手动设置命令

bash

步骤1:创建工作空间


mkdir -p ~/.openclaw-it/workspace

步骤2:创建脚本

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 $STATUSOUTPUT >> $LOGFILE if echo $STATUS_OUTPUT | grep -q RPC probe: failed; then echo RPC 探测失败!正在运行自动修复... >> $LOG_FILE openclaw doctor --fix 2>&1 >> $LOG_FILE openclaw gateway restart 2>&1 >> $LOG_FILE echo 自动修复完成于 $(date) >> $LOG_FILE else echo 网关运行正常 >> $LOG_FILE fi echo --- >> $LOG_FILE EOF

步骤3:赋予执行权限

chmod +x ~/.openclaw-it/workspace/openclaw-auto-fix.sh

步骤4:添加 OpenClaw 定时任务

openclaw cron add \ --name gateway-auto-fix \ --every 1m \ --message Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh \ --no-deliver

步骤5:验证

openclaw cron list

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 gateway-auto-fix-1776291953 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 gateway-auto-fix-1776291953 技能

通过命令行安装

skillhub install gateway-auto-fix-1776291953

下载

⬇ 下载 gateway-auto-fix v2.0.0(免费)

文件大小: 3.14 KB | 发布时间: 2026-4-16 18:16

v2.0.0 最新 2026-4-16 18:16
**Summary**: Version 2.0.0 migrates gateway health checks and auto-fix scheduling to the OpenClaw built-in cron system.

- Uses OpenClaw's built-in cron system instead of standard OS cron for scheduling.
- Updated setup and uninstall instructions to use `openclaw cron add` and `openclaw cron rm`.
- Simplified manual install steps and removed legacy OS-specific cron references.
- Clarified logging and health check instructions.
- Documentation and usage commands updated throughout for clarity and alignment with current OpenClaw conventions.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部