微信定时推送
通过 OpenClaw Cron 定时任务向微信用户主动推送消息(天气、提醒、新闻摘要等)。当用户需要:设置定时提醒、每日推送、定时通知、微信主动发消息、cron 推送到微信时触发。支持一次性(at)和循环(cron/every)任务,通过 sessionKey 路由到指定微信用户,AI 对话模式下自动获取 se... Skill: 微信定时推送 Owner: gausshj Summary: 通过 OpenClaw Cron 定时任务向微信用户主动推送消息(天气、提醒、新闻摘要等)。当用户需要:设置定时提醒、每日推送、定时通知、微信主动发消息、cron 推送到微信时触发。支持一次性(at)和循环(cron/every)任务,通过 sessionKey 路由到指定微信用户,AI 对话模式下自动获取 se... Tags: latest:2.0.0 Version history: v2.0.0 | 2026-04-29T16:08:24.610Z | user Version 2.0.0 of weixin-cron-push - No file changes detected in this release. - All documentation, functionality, and usage remain the same as t
Rank
62
Safety
84
Downloads
994
Updated
Oct 11, 2026
Version
2.0.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 994 downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 994 downloadsadoption · observed Oct 11, 2026
- Latest release
- 2.0.0release · observed Apr 29, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 2.0.0release
Version 2.0.0 of weixin-cron-push - No file changes detected in this release. - All documentation, functionality, and usage remain the same as the previous version.
Observed Apr 29, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s17dnk0kf0wvrrpj0t90k7emy585r7vy:weixin-cron-push- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-gausshj-weixin-cron-push/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
25,946 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: weixin-cron-push
description: "通过 OpenClaw Cron 定时任务向微信用户主动推送消息(天气、提醒、新闻摘要等)。当用户需要:设置定时提醒、每日推送、定时通知、微信主动发消息、cron 推送到微信时触发。支持一次性(at)和循环(cron/every)任务,通过 sessionKey 路由到指定微信用户,AI 对话模式下自动获取 sessionKey。"
---
# 微信 Cron 推送
通过 Cron 定时任务实现微信主动推送。
## 原理
```
Cron agentTurn → 独立会话 → --announce + --channel openclaw-weixin → 微信投递到用户手机
```
关键:
- `--session-key` 指定用户的微信会话桶(格式:`agent:main:openclaw-weixin:direct:<userId>@im.wechat`)
- `--announce --channel openclaw-weixin` 确保回复通过微信投递
- `--message`(agentTurn)而非 `--system-event`(systemEvent 走 main 桶,无法投递)
## 前提
- 微信插件 `openclaw-weixin` 已安装启用
- 至少一个微信账号已扫码登录
- Gateway 正在运行
- 用户通过微信给机器人发过至少一条消息(建立 sessionKey)
## 创建任务
### 一次性提醒(at)
```bash
openclaw cron add \
--name "提醒标题" \
--at "2026-04-29T10:00:00Z" \
--message "请告诉用户:这是提醒内容" \
--session-key "agent:main:openclaw-weixin:direct:<userId>@im.wechat" \
--announce \
--channel openclaw-weixin \
--delete-after-run
```
### 每日定时推送(cron 表达式)
```bash
openclaw cron add \
--name "每日天气" \
--cron "0 8 * * *" \
--tz "Asia/Shanghai" \
--message "请查询今天天气并发送给用户。" \
--session-key "agent:main:openclaw-weixin:direct:<userId>@im.wechat" \
--announce \
--channel openclaw-weixin
```
### 循环间隔(every)
```bash
openclaw cron add \
--name "每小时间隔" \
--every "1h" \
--message "请执行 XXX 检查并告知用户结果。" \
--session-key "agent:main:openclaw-weixin:direct:<userId>@im.wechat" \
--announce \
--channel openclaw-weixin
```
### AI 对话方式
用户直接说"明天早上8点提醒我开会",AI 自动创建任务。AI 需从当前会话获取 sessionKey 并使用上述参数。
## 获取 sessionKey
```bash
# 方法1:从会话列表查找(找含 openclaw-weixin 的 key)
openclaw sessions --json --all-agents | grep openclaw-weixin
# 方法2:从会话文件查找(自动适配 macOS / Linux)
python3 -c "
import json, pathlib
sessions_file = pathlib.Path.home() / '.openclaw' / 'agents' / 'main' / 'sessions' / 'sessions.json'
with open(sessions_file) as f:
for k in json.load(f):
if 'openclaw-weixin' in k and 'direct' in k:
print(k)
"
# 方法3:从微信账号配置获取 userId,拼接为:
# agent:main:openclaw-weixin:direct:<userId>@im.wechat
# userId 在 ~/.openclaw/openclaw-weixin/accounts/*.json 中
```
## 关键 CLI 参数
| 参数 | 必填 | 说明 |
|------|------|------|
| `--message <文本>` | ✅ | agentTurn 消息内容,AI 处理后回复用户 |
| `--session-key <key>` | ✅ | 微信会话桶 key(决定路由到哪个用户) |
| `--announce` | ✅ | 启用投递(否则回复不发送) |
| `--channel openclaw-weixin` | ✅ | 指定通过微信渠道投递 |
| `--at <ISO时间>` | 调度 | 一次性触发 |
| `--cron <表达式>` | 调度 | Cron 表达式循环 |
| `--every <间隔>` | 调度 | 固定间隔循环(如 10m, 1h) |
| `--tz <时区>` | 否 | 时区(如 Asia/Shanghai) |
| `--delete-after-run` | 否 | 触发后自动删除 |
| `--name <名称>` | 否 | 任务名称 |
| `--account <id>` | 否 | 多账号时指定微信账号 |
## ⚠️ 重要:system-event vs message
| 方式 | 投递 | 说明 |
|------|------|------|
| `--system-event` + `--session main` | ❌ 不可靠 | 注入 main 桶,没有 deliveryContext,回复无法投递 |
| `--message` + `--session-key` + `--announce` | ✅ 可靠 | 独立会话 + 明确投递渠道,消息必定到达微信 |
**必须用 `--message` 方式,不要用 `--system-event`。**
## 管理命令
```bash
openclaw cron list # 查看活跃任务
openclaw cron list --all # 含已禁用README.md
# weixin-cron-push OpenClaw Skill — 通过 Cron 定时任务向微信用户主动推送消息。 ## 功能 - 一次性提醒(`at`)、每日定时推送(`cron`)、固定间隔循环(`every`) - 精准路由:通过 `--session-key` 定位到具体微信用户 - 支持多微信账号隔离 - 可通过 CLI 或 AI 对话创建任务 ## 原理 ``` Cron agentTurn → 独立会话 → --announce + --channel openclaw-weixin → 微信投递到用户手机 ``` - `--session-key` 指定用户的微信会话桶 - `--announce --channel openclaw-weixin` 确保回复通过微信投递 - `--message`(agentTurn)而非 `--system-event` ## 前提 - 已安装并启用 `openclaw-weixin` 插件 - 至少一个微信账号已扫码登录 - Gateway 正在运行 - 目标用户通过微信给机器人发过至少一条消息(建立 sessionKey) ## 安装 将本仓库作为 skill 添加到 OpenClaw: ```bash openclaw skill add https://github.com/gausshj/openclaw-weixin-cron-push ``` ## 使用示例 ```bash # 一次性提醒 openclaw cron add \ --name "开会提醒" \ --at "2026-04-30T09:00:00+08:00" \ --message "请告诉用户:10点有产品评审会议" \ --session-key "agent:main:openclaw-weixin:direct:<userId>@im.wechat" \ --announce \ --channel openclaw-weixin \ --delete-after-run # 每日天气推送 openclaw cron add \ --name "每日天气" \ --cron "0 8 * * *" \ --tz "Asia/Shanghai" \ --message "请查询今天天气并发送给用户。" \ --session-key "agent:main:openclaw-weixin:direct:<userId>@im.wechat" \ --announce \ --channel openclaw-weixin ``` 也可以直接对 AI 说"明天早上8点提醒我开会",自动创建任务。 ## 获取 sessionKey ```bash # 从会话列表查找 openclaw sessions --json --all-agents | grep openclaw-weixin # 或从微信账号配置获取 userId,拼接为: # agent:main:openclaw-weixin:direct:<userId>@im.wechat # userId 在 ~/.openclaw/openclaw-weixin/accounts/*.json 中 ``` ## ⚠️ 重要 必须用 `--message` + `--session-key` + `--announce` 方式,**不要用 `--system-event`**。 `--system-event` 走 main 桶,没有 deliveryContext,回复无法投递到微信。 ## 文件说明 | 文件 | 说明 | |------|------| | `SKILL.md` | Skill 定义文件,包含触发条件和使用文档 | | `references/weixin-api.md` | 微信 API 协议细节 | | `LICENSE` | MIT License | ## License MIT
_meta.json
{
"ownerId": "kn7chhbmqpm74y2xfnespc7nsx85sb9h",
"slug": "weixin-cron-push",
"version": "2.0.0",
"publishedAt": 1777478904610
}references/weixin-api.md
# 微信插件 API 参考
## 插件信息
- 包名:`@tencent-weixin/openclaw-weixin`
- 插件 ID:`openclaw-weixin`
- 渠道:`openclaw-weixin`
- 后端:`https://ilinkai.weixin.qq.com`
## 安装与登录
```bash
# 一键安装
npx -y @tencent-weixin/openclaw-weixin-cli install
# 启用
openclaw config set plugins.entries.openclaw-weixin.enabled true
# 扫码登录
openclaw channels login --channel openclaw-weixin
# 重启生效
openclaw gateway restart
```
## 账号文件
登录凭证保存在 `~/.openclaw/openclaw-weixin/accounts/<id>-im-bot.json`:
```json
{
"token": "<bot-token>",
"baseUrl": "https://ilinkai.weixin.qq.com",
"userId": "<user-id>@im.wechat"
}
```
## 后端 API
所有接口 `POST`,JSON 格式。
### 通用 Header
| Header | 值 |
|--------|------|
| `Content-Type` | `application/json` |
| `AuthorizationType` | `ilink_bot_token` |
| `Authorization` | `Bearer <token>` |
| `X-WECHAT-UIN` | 随机 uint32 的 base64 |
### sendMessage
发送消息给用户:
```json
{
"msg": {
"to_user_id": "<用户ID>",
"context_token": "<上下文令牌>",
"client_id": "<客户端ID>",
"message_type": 2,
"message_state": 2,
"item_list": [
{ "type": 1, "text_item": { "text": "你好" } }
]
}
}
```
MessageType: 1=USER, 2=BOT
MessageState: 0=NEW, 1=GENERATING, 2=FINISH
Item type: 1=TEXT, 2=IMAGE, 3=VOICE, 4=FILE, 5=VIDEO
### getUpdates
长轮询获取新消息:
```json
{
"get_updates_buf": ""
}
```
### getConfig
获取账号配置(typing ticket 等):
```json
{
"ilink_user_id": "<用户ID>",
"context_token": "<可选>"
}
```
### sendTyping
```json
{
"ilink_user_id": "<用户ID>",
"typing_ticket": "<ticket>",
"status": 1
}
```
status: 1=正在输入, 2=取消
### getUploadUrl
获取 CDN 上传预签名参数(发图片/文件前调用)。
## CDN 上传流程
1. 计算文件明文大小和 MD5
2. AES-128-ECB 加密文件,计算密文大小
3. 调用 getUploadUrl 获取 upload_param
4. PUT 上传加密文件到 CDN
5. 用 encrypt_query_param 构造 CDNMedia 引用
## 消息结构 (WeixinMessage)
| 字段 | 类型 | 说明 |
|------|------|------|
| seq | number | 消息序列号 |
| message_id | number | 消息唯一 ID |
| from_user_id | string | 发送者 |
| to_user_id | string | 接收者 |
| create_time_ms | number | 时间戳(ms) |
| message_type | number | 1=USER, 2=BOT |
| message_state | number | 0/1/2 |
| item_list | MessageItem[] | 内容列表 |
| context_token | string | 回复时需回传 |
## 相关路径
- 插件目录:`~/.openclaw/extensions/openclaw-weixin/`
- 账号配置:`~/.openclaw/openclaw-weixin/accounts/`
- 源码:`~/.openclaw/extensions/openclaw-weixin/src/`skill-card.md
## Description: 通过 OpenClaw Cron 定时任务向微信用户主动推送消息(天气、提醒、新闻摘要等),支持一次性 at、循环 cron/every 任务,并通过 sessionKey 路由到指定微信用户。 This skill is ready for commercial/non-commercial use. ## Publisher: [gausshj](https://clawhub.ai/user/gausshj) ### License/Terms of Use: MIT-0 ## Use Case: Developers and OpenClaw users use this skill to create scheduled WeChat reminders, daily pushes, and recurring notifications through the openclaw-weixin channel. It helps route automated messages to a specific WeChat user or account after a sessionKey has been established. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill can create scheduled and recurring WeChat messages to a selected sessionKey. Mitigation: Review the recipient sessionKey, schedule, message content, account, and delete-after-run behavior before allowing task creation. Risk: The skill describes local account and session files that may contain sensitive tokens or identifiers. Mitigation: Do not expose ~/.openclaw account/session files or bearer tokens in prompts, logs, shared outputs, or screenshots. Risk: The security review flags broad recurring-message behavior with limited user-control and privacy safeguards. Mitigation: Prefer explicit user confirmation for recurring tasks and periodically audit active cron jobs with openclaw cron list. Risk: Installer and plugin commands may pull external packages. Mitigation: Use pinned or verified installer versions and review plugin provenance before enabling the WeChat channel. ## Reference(s): - [Skill page](https://clawhub.ai/gausshj/skills/weixin-cron-push) - [Weixin API reference](references/weixin-api.md) - [WeChat plugin backend](https://ilinkai.weixin.qq.com) ## Skill Output: **Output Type(s):** [Text, Markdown, Shell commands, Configuration] **Output Format:** [Markdown guidance with inline shell commands and configuration examples] **Output Parameters:** [1D] **Other Properties Related to Output:** [May create one-time or recurring OpenClaw cron task proposals that send messages through WeChat when executed.] ## Skill Version(s): 2.0.0 (source: server release metadata) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/gausshj/skills/weixin-cron-push",
"sourceUrl": "https://clawhub.ai/gausshj/skills/weixin-cron-push",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T20:54:08.145Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-gausshj-weixin-cron-push/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-gausshj-weixin-cron-push/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T20:54:08.145Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "994 downloads",
"href": "https://clawhub.ai/gausshj/weixin-cron-push",
"sourceUrl": "https://clawhub.ai/gausshj/weixin-cron-push",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T20:54:08.145Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.0.0",
"href": "https://clawhub.ai/gausshj/weixin-cron-push",
"sourceUrl": "https://clawhub.ai/gausshj/weixin-cron-push",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-29T16:08:24.610Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-gausshj-weixin-cron-push/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-gausshj-weixin-cron-push/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.0.0",
"description": "Version 2.0.0 of weixin-cron-push - No file changes detected in this release. - All documentation, functionality, and usage remain the same as the previous version.",
"href": "https://clawhub.ai/gausshj/weixin-cron-push",
"sourceUrl": "https://clawhub.ai/gausshj/weixin-cron-push",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-29T16:08:24.610Z",
"isPublic": true
}
]
}Record generated Oct 12, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-gausshj-weixin-cron-push/run-check
