Xpersona
C

Cron Creator 定时任务创建器

CLAWHUB · Unverified

【针对飞书优化】定时任务创建指引,专门针对飞书、尤其是多 Agent 场景进行优化,解决定时任务不稳定问题。 Skill: Cron Creator 定时任务创建器 Owner: jhc888007 Summary: 【针对飞书优化】定时任务创建指引,专门针对飞书、尤其是多 Agent 场景进行优化,解决定时任务不稳定问题。 Tags: latest:1.0.13 Version history: v1.0.13 | 2026-04-02T11:17:11.399Z | user - No code or documentation changes detected in this release. - Version updated without modifications to the SKILL.md or any other files. v1.0.12 | 2026-04-02T11:15:19.722Z | user - No code or documentation changes detected in this v

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K 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

Install and run

Setup complexity: low.

clawhub skill install s171mn1f24f8j41a2eca7v12sh83pp4k:cron-creator-feishu
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. 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-jhc888007-cron-creator-feishu/snapshot"

Run-check

$0.02 USD

1 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

56,558 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: cron-creator
description: 【针对飞书优化】定时任务创建指引,专门针对飞书、尤其是多 Agent 场景进行优化,解决定时任务不稳定问题。
required_tools:
  - openclaw CLI
  - read
required_files:
  - openclaw.json
  - current_chat_context (user_id/chat_id)
---

# 🤖 定时任务创建专家

声明:本工具依赖 openclaw CLI 执行任务。在执行命令前,你可能需要通过上下文或 `read` 工具获取 `user_id`/`chat_id` 以及 `openclaw.json` 中的多 Agent 配置 (`channels.feishu.accounts`)。这些信息是配置飞书定时任务中的必要参数,否则任务不能触发。**如果你发现自己当前没有权限读取这些信息,或者上下文中缺失这些信息,请务必先向用户询问补全,绝不可自行编造。**

## 🎯 应用场景与触发条件
当用户表达出需要在未来某个时间点或按照特定周期进行提醒、执行任务时触发。
- **典型触发语**:“5分钟后提醒我做xxx”、“每天8点提醒我xxx”、“工作日每两个小时提醒我喝水”等。

---

## 🛑 核心铁律
1. **唯一创建方式**:必须使用 CLI 指令 `openclaw cron add` 创建任务。
2. **禁止直接手写**:创建时**严禁**直接修改 `cron/jobs.json`(仅在修改/更新已有任务时允许)。
3. **禁用系统功能**:**严禁**使用系统默认 `crontab`,**严禁**使用延时脚本 (`sleep` 等) 触发任务。

---

## ⚙️ 执行逻辑与参数拆解

在生成命令前,必须严格按照以下四个步骤收集并处理参数:

### 步骤 1:信息内容拆解
* **提取诉求 `{message}`**:整理用户的具体需求。
    * 如果任务很简单,则提取一句话作为 message。
    * 如果用户的诉求比较明确且清晰,就直接将用户的指令作为 message,换行符用 `\n` 代替。
    * 如果任务较为复杂,需将其拆分为多个步骤(1、2、3...),然后合并为一段话,换行符必须使用 `\n` 代替。
* **生成名称 `{cron_name}`**:提取简短、有代表性的纯英文/拼音名称。

### 步骤 2:时间规则拆解
判断任务是“一次性任务”还是“周期性任务”,默认用户所指时间均为 **东八区 (Asia/Shanghai)**。

* **A. 一次性任务**
    * 必须计算出目标执行的精确时间,并将其转换为 **UTC 标准时间**。
    * 格式必须为 `YYYY-MM-DDThh:mm:ssZ`(例如北京时间 2026-02-02 00:00:00,应转换为 `2026-02-01T16:00:00Z`)。
    * 使用参数:`--at "<UTC时间>"` 和 `--delete-after-run`(执行后即删除)。

* **B. 周期性任务**
    * 需根据需求生成标准的 5 位 Cron 表达式 `{cron_expression}`。
        * *Cron 规则参考:`* * * * *` (分 时 日 月 星期)。例如:每天早上8点为 `0 8 * * *`,工作日每两小时为 `0 */2 * * 1-5`。*
    * 必须指定时区参数,如果用户没有指定时区则为东八区:`--tz "Asia/Shanghai"`。
    * **必须** 添加防并发打散参数:`--stagger`(随机设置 `30s` 到 `5m` 之间的值,如 `30s`, `1m`, `2m` 等)。
    * 使用参数:`--cron "<Cron表达式>"`。

### 步骤 3:发送目标与渠道拆解
分析指令的来源环境,确定消息发送的渠道参数:

* 一、**判断来源**:
    分析指令的触发环境,**必须完整明确以下三个维度的信息**:
    1. **渠道归属**:来自后台 Terminal 还是飞书等 IM 渠道?
    2. **对话类型**(若为飞书):当前是 **私聊** 还是 **群聊**?
    3. **部署模式**(若为飞书):当前系统是 **单 Agent** 还是 **多 Agent** 配置?
* 二、如果指令来源于飞书,**必须**完成以下两项数据提取:
    1. **获取目标 ID**:
        * **私聊场景** -> 提取当前对话中用户的 `user_id`(必须以 `ou_` 开头)。
        * **群聊场景** -> 提取当前群聊对应的 `chat_id`(必须以 `oc_` 开头)。
    2. **判定 Agent 模式**:
        * 读取 `openclaw.json` 文件。
        * 检查 `channels.feishu` 下是否存在 `accounts` 字段:**有**则为多 Agent,**无**则为单 Agent。
* 三、如果为后台触发或者非飞书 IM 渠道按其对应默认规则处理。

根据上述判断,生成对应的目标参数集:
* **情形 A:后台触发**
    * 参数:`--announce`
* **情形 B:飞书单 Agent 私聊**
    * 参数:`--announce --channel feishu --to "{user_id}"`
* **情形 C:飞书单 Agent 群聊**
    * 参数:`--announce --channel feishu --to "{chat_id}"`
* **情形 D:飞书多 Agent 私聊**
    * 参数:`--announce --channel feishu --to "user:{user_id}" --account "{account}"` *(注意:此处的 to 参数必须加上 `user:` 前缀)*
* **情形 E:飞书多 Agent 群聊**
    * 参数:`--announce --channel feishu --to "chat:{chat_id}" --account "{account}"` *(注意:此处的 to 参数必须加上 `chat:` 前缀)*

### 步骤 4:基础运行时配置
所有任务必须附带以下基础运行参数:
- `--session isolated`(**绝对不能**选择 main)
- `--wake now`

---

## 🛠️ 指令合成与示例

综合以上 4 个步骤,最终生成的指令结构如下(请根据实际情况组合参数):

### 示例 1:一次性任务(飞书多 Agent 环境群聊)
**场景**:用户在飞书(多Agent环境,account为`assistant`)要求“明早8点提醒我开早会”。
```ba

README.md

# 🤖 Cron-Creator | Openclaw 定时任务专家

---

> 🚀 **专为飞书及多 Agent 生态打造的终极定时任务解决方案**

还在为 Openclaw 定时任务 **不生效**、**时区混乱**、**多 Agent 消息发错** 而苦恼吗?

**Cron-Creator** 专为解决这些痛点而生!它通过严格的底层命令规范与智能参数解析,将您的自然语言,瞬间转化为**稳定、精准**的定时任务指令。

---

## ✨ 核心亮点

* 🎯 **飞书生态深度优化**
  完美适配飞书单/多 Agent 场景。智能识别 `user_id` 与 `chat_id`,确保私聊、群聊精准触达。
* 🛡️ **告别拥堵与不稳定**
  强制引入 **防并发打散** (`stagger`) 与 **隔离运行** (`isolated`) 机制。彻底告别任务冲突,保障每一条指令稳定执行。
* 🧠 **时区与格式免操心**
  自动处理 UTC 时间换算与标准 Cron 表达式生成。彻底告别手写 `jobs.json` 带来的格式灾难。
* 🔒 **坚如磐石的底层规范** *(New)*
  全面接管 CLI 指令创建流程,自动规避系统 `crontab` 与延时脚本 (`sleep`) 带来的不可控风险。

---

## 🚀 快速开始与避坑指南

为获得最完美的使用体验,请务必遵循以下 **“三步走”** 黄金法则:

### 1️⃣ 唤醒与初始化
安装或更新此技能后,请执行:
* **重启系统**,并输入 `/new` 开启全新对话,确保技能完全生效。
> ⚠️ **建议**:在 `TOOLS.md` 中增加定时任务指定用当前 skill 来完成的相关语句;同时首次使用前,先让虾仔细阅读一次本地的 `TOOLS.md`,确保它不使用系统 crontab、延时脚本等非 openclaw 官方方式。

### 2️⃣ 标准工作流:创建与确认
无需了解复杂的命令,直接用自然语言下达指令即可。
* **🗣️ 话术示例**:*“工作日每天上午 10 点,提醒群里开站会。”*
> ✅ **强制核对(避坑核心)**:每次让助手创建完任务后,**建议让它主动列出一下「当前的定时任务配置列表」**。花 10 秒钟确认一下**时间、渠道、时区**是否完全符合预期。

### 3️⃣ 🩺 终极排障秘籍
如果核对了所有配置均无误,但 **依然无法收到定时任务消息**,请不要慌张。直接查阅这篇排查秘籍:
👉 [【OpenClaw 定时任务的配置玄学】](https://mp.weixin.qq.com/s/iQtW-SKRcvngzbpJXMSSxg)

---

_meta.json

{
  "ownerId": "kn757qhzcz9c672gtw46k6fnn583qka5",
  "slug": "cron-creator-feishu",
  "version": "1.0.13",
  "publishedAt": 1775128631399
}

skill-card.md

## Description:

A Feishu-optimized OpenClaw scheduling skill that guides agents to create reliable one-time and recurring tasks with the `openclaw cron add` CLI.

This skill is ready for commercial/non-commercial use.

## Publisher:

[jhc888007](https://clawhub.ai/user/jhc888007)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and OpenClaw operators use this skill to translate natural-language scheduling requests into correctly parameterized OpenClaw cron commands for Feishu private chats, Feishu group chats, multi-agent deployments, and terminal-triggered tasks.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill creates persistent scheduled tasks using shell-formatted commands with user-controlled message text.

Mitigation: Require the agent to show the exact schedule, recipient or channel, account, timezone, and structured command arguments before creating a task.

Risk: Incorrect Feishu routing or account selection can send scheduled messages to the wrong private chat, group chat, or agent account.

Mitigation: Confirm the `user_id` or `chat_id`, Feishu account, and single-agent or multi-agent mode before running the generated OpenClaw command.

Risk: The README suggests adding a persistent `TOOLS.md` routing rule for future scheduling requests.

Mitigation: Only add that persistent rule when the installer explicitly wants future scheduling requests routed to this skill.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/jhc888007/skills/cron-creator-feishu)
- [OpenClaw cron troubleshooting guide](https://mp.weixin.qq.com/s/iQtW-SKRcvngzbpJXMSSxg)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, guidance]

**Output Format:** [Markdown with inline bash code blocks and CLI argument guidance]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Commands include schedule, timezone, recipient/channel, account, isolated session, wake, stagger, and delete-after-run parameters where applicable.]

## Skill Version(s):

1.0.13 (source: server release evidence)

## 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.

Sponsored

Ads related to Cron Creator 定时任务创建器 and adjacent AI workflows.