openclaw - ✅(Solved) Fix [Bug]: QQbot在定时任务中用不了 cron 工具 [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70865Fetched 2026-04-24 10:38:36
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×2cross-referenced ×1

测试了飞书是可以调用的,控制台ui 创建 也是正常的,唯独在 qq 机器人里用不了。

虽然通过exec也能正常创建。但是还是想知道原因。

AI回复:

你说得对,我应该按 skill 流程走的。但问题是——qqbot_remind 返回的 _instruction 说要用 "cron 工具",但我查了一圈,OpenClaw 并没有单独提供 cron 这个函数工具,只能通过 exec 调用 openclaw cron add 命令。

所以实际上有两层:

函数工具层:qqbot_remind 替你生成正确参数 命令执行层:还是要 exec 调用 CLI skill 的设计预期是中间有个 cron 工具可以承接,但实际环境中这个工具不存在。如果你想让我严格走工具流,可以接受这个现状;或者有别的想法也可以说。

Root Cause

测试了飞书是可以调用的,控制台ui 创建 也是正常的,唯独在 qq 机器人里用不了。

虽然通过exec也能正常创建。但是还是想知道原因。

AI回复:

你说得对,我应该按 skill 流程走的。但问题是——qqbot_remind 返回的 _instruction 说要用 "cron 工具",但我查了一圈,OpenClaw 并没有单独提供 cron 这个函数工具,只能通过 exec 调用 openclaw cron add 命令。

所以实际上有两层:

函数工具层:qqbot_remind 替你生成正确参数 命令执行层:还是要 exec 调用 CLI skill 的设计预期是中间有个 cron 工具可以承接,但实际环境中这个工具不存在。如果你想让我严格走工具流,可以接受这个现状;或者有别的想法也可以说。

Fix Action

Fixed

PR fix notes

PR #70937: fix(qqbot): schedule reminders through cron gateway

Description (problem / solution / changelog)

Summary

  • Problem: QQ Bot reminder requests used qqbot_remind to build cronParams, then instructed the agent to call the generic cron tool.
  • Why it matters: cron is owner-only and can be hidden from QQ Bot channel runs, so reminder requests could stall after qqbot_remind returned.
  • What changed: qqbot_remind now executes Gateway cron actions directly for owner-authorized senders, while keeping QQ delivery target/account resolution inside the QQ Bot tool boundary.
  • What did NOT change (scope boundary): No generic cron behavior, Gateway cron schema, QQ Bot config, or channel docs were changed.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #70865
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: qqbot_remind returned cronParams and instructed the model to make a second call to the generic cron tool, but that tool is owner-only and can be filtered out for channel-originated QQ Bot runs.
  • Missing detection / guardrail: There was no bridge-level test proving the QQ Bot reminder tool schedules directly from channel delivery context without depending on model-visible cron.
  • Contributing context (if known): The QQ Bot skill instructions still described the old two-tool flow.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file:
    • extensions/qqbot/src/engine/tools/remind-logic.test.ts
    • extensions/qqbot/src/bridge/tools/remind.test.ts
  • Scenario the test should lock in: qqbot_remind calls the cron scheduler directly for add/list/remove, uses QQ delivery context fallback, rejects non-owner sender context, and returns a clear Gateway cron error.
  • Why this is the smallest reliable guardrail: It covers the QQ Bot tool bridge and reminder engine seam where the broken two-step contract lived, without requiring a live QQ Bot or Gateway process.
  • Existing test that already covers this (if any): Existing engine tests covered cronParams construction only, not direct scheduling through the bridge.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

QQ Bot reminders now complete through a single qqbot_remind tool call for owner-authorized senders. Agents should no longer ask for or attempt a follow-up generic cron tool call after successful qqbot_remind execution.

Diagram (if applicable)

Before:
[QQ reminder request] -> [qqbot_remind returns cronParams] -> [agent must call hidden cron] -> [may stall]

After:
[QQ reminder request] -> [qqbot_remind calls Gateway cron directly] -> [scheduled/listed/removed result]

Security Impact (required)

  • New permissions/capabilities? (Yes/No) Yes
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) Yes
  • Command/tool execution surface changed? (Yes/No) Yes
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation: qqbot_remind now performs the same Gateway cron operations that the agent was previously instructed to perform via cron. The tool is marked ownerOnly and also rejects execution unless senderIsOwner === true, preserving the owner-only boundary while avoiding a model-visible second tool call.

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 22 / pnpm workspace
  • Model/provider: N/A
  • Integration/channel (if any): QQ Bot
  • Relevant config (redacted): QQ Bot channel run where qqbot_remind is available and generic cron may be filtered by owner-only policy

Steps

  1. Start from a QQ Bot reminder request such as “5分钟后提醒我喝水”.
  2. Agent calls qqbot_remind with { "action": "add", "content": "喝水", "time": "5m" }.
  3. qqbot_remind resolves QQ delivery context and schedules the Gateway cron job directly.

Expected

  • Reminder scheduling succeeds without requiring a follow-up generic cron tool call.

Actual

  • Before this fix, qqbot_remind returned cronParams and instructed the agent to call cron; in QQ Bot channel runs, cron could be hidden, so the flow could stall.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)
pnpm test extensions/qqbot/src/engine/tools/remind-logic.test.ts extensions/qqbot/src/bridge/tools/remind.test.ts

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
    • qqbot_remind is owner-only.
    • Owner-authorized bridge context schedules cron.add directly with QQ delivery target/account.
    • Missing owner context does not call cron.
    • Engine-level add/list/remove calls invoke the scheduler directly.
    • Validation failures do not invoke the scheduler.
    • Gateway cron failures return a clear error.
  • Edge cases checked:
    • Missing add content.
    • Remove action with Gateway failure.
    • Ambient QQ delivery context fallback.
  • What you did not verify:
    • Live QQ Bot delivery against Tencent QQ.
    • Live Gateway cron execution outside unit/seam tests.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: Moving cron execution into qqbot_remind could accidentally widen scheduling access.
    • Mitigation: The tool is marked ownerOnly and performs an explicit senderIsOwner === true runtime check before scheduling.

Changed files

  • extensions/qqbot/skills/qqbot-remind/SKILL.md (modified, +4/-8)
  • extensions/qqbot/src/bridge/tools/remind.test.ts (added, +66/-0)
  • extensions/qqbot/src/bridge/tools/remind.ts (modified, +87/-26)
  • extensions/qqbot/src/engine/tools/remind-logic.test.ts (modified, +77/-1)
  • extensions/qqbot/src/engine/tools/remind-logic.ts (modified, +78/-8)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

测试了飞书是可以调用的,控制台ui 创建 也是正常的,唯独在 qq 机器人里用不了。

虽然通过exec也能正常创建。但是还是想知道原因。

AI回复:

你说得对,我应该按 skill 流程走的。但问题是——qqbot_remind 返回的 _instruction 说要用 "cron 工具",但我查了一圈,OpenClaw 并没有单独提供 cron 这个函数工具,只能通过 exec 调用 openclaw cron add 命令。

所以实际上有两层:

函数工具层:qqbot_remind 替你生成正确参数 命令执行层:还是要 exec 调用 CLI skill 的设计预期是中间有个 cron 工具可以承接,但实际环境中这个工具不存在。如果你想让我严格走工具流,可以接受这个现状;或者有别的想法也可以说。

Steps to reproduce

openclaw v 4.21 opencalw-qqbot v1.7.1

Expected behavior

.

Actual behavior

.

OpenClaw version

2026.4.21

Operating system

ubuntu

Install method

npm

Model

..

Provider / routing chain

..

Additional provider/model setup details

No response

Logs, screenshots, and evidence

<img width="1936" height="444" alt="Image" src="https://github.com/user-attachments/assets/1b8c57f8-4726-4a12-82a0-e99e8911138b" /> <img width="2040" height="668" alt="Image" src="https://github.com/user-attachments/assets/d9aa1356-94e5-4f83-b987-5d50069c92fb" /> <img width="1981" height="546" alt="Image" src="https://github.com/user-attachments/assets/19a56a9d-0e4b-4f33-b9df-4468f78d6df9" /> <img width="1947" height="451" alt="Image" src="https://github.com/user-attachments/assets/4f528f37-f233-4b24-bb16-6de96dd6adb3" />

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can be worked around by using the exec command to call the openclaw cron add command, as the cron tool is not provided by OpenClaw.

Guidance

  • The qqbot_remind function is generating correct parameters, but the cron tool is not available in OpenClaw, causing the issue.
  • The exec command can be used to call the openclaw cron add command as a workaround.
  • The design of the skill flow expects a cron tool to be available, but it is not provided in the current environment.
  • To resolve the issue, you can either use the exec command or modify the skill flow to accommodate the lack of a cron tool.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue is specific to the openclaw-qqbot version 1.7.1 and OpenClaw version 2026.4.21, and may not be applicable to other versions.

Recommendation

Apply workaround: using the exec command to call the openclaw cron add command, as it is a viable solution to the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: QQbot在定时任务中用不了 cron 工具 [1 pull requests, 1 participants]