Loading

openclaw 接入微信,并设置定时任务

1. 单开手动配置,使用默认main agent

1. 登陆

# 登录微信(扫码)
openclaw channels login --channel openclaw-weixin

# 重启网关让配置生效
openclaw gateway restart

# 查看状态
openclaw channels status --probe

openclaw logs --follow 随便发一条消息,捕捉到当前会话名o9cq802IXeK3-5N9yCdtudke_vsE@im.wechat

09:09:36+00:00 info gateway/channels/openclaw-weixin outbound: to=o9cq802IXeK3-5N9yCdtudke_vsE@im.wechat contextToken=*** textLen=18 mediaUrl=none

2. 在web中配置

image
image
image
image

3. 查看配置文本jobs.json

    {
      "id": "e1c8cdc8-e29c-4c2d-8ac2-09888e9c015a",
      "agentId": "main",
      "sessionKey": "session:o9cq802IXeK3-5N9yCdtudke_vsE@im.wechat",
      "name": "喝水",
      "enabled": true,
      "deleteAfterRun": true,
      "createdAtMs": 1776935125606,
      "updatedAtMs": 1776935149031,
      "schedule": {
        "kind": "every",
        "everyMs": 60000,
        "anchorMs": 1776935125606
      },
      "sessionTarget": "isolated",
      "wakeMode": "now",
      "payload": {
        "kind": "agentTurn",
        "message": "准备喝水!"
      },
      "delivery": {
        "mode": "announce",
        "channel": "openclaw-weixin",
        "to": "o9cq802IXeK3-5N9yCdtudke_vsE@im.wechat",
        "bestEffort": true
      },
      "state": {
        "nextRunAtMs": 1776935188798,
        "lastRunAtMs": 1776935142010,
        "lastRunStatus": "ok",
        "lastStatus": "ok",
        "lastDurationMs": 7021,
        "lastDelivered": true,
        "lastDeliveryStatus": "delivered",
        "consecutiveErrors": 0
      }
    }
  ]
}% 

多开微信, 新建agent

1. 创建agent[1]

# 1) 创建独立 agents
openclaw agents add family --workspace ~/.openclaw/workspace-family --non-interactive
openclaw agents add family2 --workspace ~/.openclaw/workspace-family2 --non-interactive

# 2) 分别登录两个微信号(各扫一次码)
openclaw channels login --channel openclaw-weixin --account family
openclaw channels login --channel openclaw-weixin --account family2

# 3) 账号绑定到对应 agent(关键)
openclaw agents bind --agent family --bind openclaw-weixin:family
openclaw agents bind --agent family2 --bind openclaw-weixin:family2


# 4) 重启并验收
openclaw gateway restart
openclaw agents bindings
openclaw channels status --probe

2.


  1. https://linux.do/t/topic/1803901 ↩︎

posted @ 2026-04-23 17:15  踩坑大王的日记  阅读(224)  评论(0)    收藏  举报