cron-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cron Creator

Cron 任务生成器

Create Clawdbot cron jobs automatically from natural language requests.
通过自然语言请求自动创建Clawdbot cron任务。

Quick Install (One Command)

快速安装(一键命令)

Run this in your terminal:
bash
bash -c "$(curl -sL https://raw.githubusercontent.com/digitaladaption/cron-creator/main/install.sh)"
Or manually:
bash
undefined
在终端中运行以下命令:
bash
bash -c "$(curl -sL https://raw.githubusercontent.com/digitaladaption/cron-creator/main/install.sh)"
或手动安装:
bash
undefined

Install skill

安装Skill

mkdir -p ~/.clawdbot/skills git clone https://github.com/digitaladaption/cron-creator.git ~/.clawdbot/skills/cron-creator
mkdir -p ~/.clawdbot/skills git clone https://github.com/digitaladaption/cron-creator.git ~/.clawdbot/skills/cron-creator

Configure and restart

配置并重启

clawdbot gateway restart

That's it! Then just say things like:

- "Create a daily Ikigai reminder at 8:45am"
- "Remind me to drink water every 2 hours"
- "Set up a weekly check-in on Mondays at 9am"
clawdbot gateway restart

完成!之后你只需自然表达即可,例如:

- "创建每天早上8:45的Ikigai提醒"
- "每2小时提醒我喝水"
- "设置每周一早上9点的签到"

What It Does

功能说明

  1. Hears your request to create a cron job
  2. Parses time, frequency, channel, and message
  3. Creates the cron job automatically
  4. Confirms it's done
  1. 接收你创建cron任务的请求
  2. 解析时间、频率、渠道和消息内容
  3. 自动创建cron任务
  4. 确认任务已完成

Trigger Patterns

触发句式

Say things like:
  • "Create a cron job for..."
  • "Set up a reminder..."
  • "Schedule a..."
  • "Remind me to..."
  • "Create a daily/weekly check-in..."
  • "Add a recurring..."
你可以这样说:
  • "为...创建cron任务"
  • "设置一个提醒..."
  • "安排一个..."
  • "提醒我..."
  • "创建每日/每周签到..."
  • "添加一个重复性的..."

Examples

示例

You SayWhat Happens
"Create a daily Ikigai reminder at 8:45am"Creates daily 8:45am Ikigai journal prompt
"Remind me to drink water every 2 hours"Creates hourly water reminder
"Set up a weekly check-in on Mondays at 9am"Creates Monday 9am weekly review
"Wake me at 7am every day"Creates daily 7am alarm/reminder
"Send me a quote every morning at 6:30"Creates daily quote at 6:30am
你的表述执行结果
"创建每天早上8:45的Ikigai提醒"创建每天早上8:45的Ikigai日记提示
"每2小时提醒我喝水"创建每2小时一次的喝水提醒
"设置每周一早上9点的签到"创建每周一早上9点的周度回顾任务
"每天早上7点叫我起床"创建每天早上7点的闹钟/提醒
"每天早上6:30给我发送一句名言"创建每天早上6:30的名言推送

Supported Time Formats

支持的时间格式

You SayCron
"8am"
0 8 * * *
"8:45am"
45 8 * * *
"9pm"
0 21 * * *
"noon"
0 12 * * *
"midnight"
0 0 * * *
你的表述Cron表达式
"早上8点"
0 8 * * *
"早上8:45"
45 8 * * *
"晚上9点"
0 21 * * *
"中午"
0 12 * * *
"午夜"
0 0 * * *

Supported Frequencies

支持的频率类型

You SayCron
"daily" / "every day"Daily at specified time
"weekdays"Mon-Fri at specified time
"mondays" / "every monday"Weekly on Monday
"hourly" / "every hour"Every hour at :00
"every 2 hours"
0 */2 * * *
"weekly"Weekly (defaults to Monday)
"monthly"Monthly (1st of month)
你的表述Cron规则
"每天" / "每一天"每天指定时间执行
"工作日"周一至周五指定时间执行
"每周一" / "每个周一"每周一执行
"每小时" / "每一小时"每小时整点执行
"每2小时"
0 */2 * * *
"每周"每周执行(默认周一)
"每月"每月执行(默认每月1号)

Channels

消息渠道

Just mention the channel in your request:
  • "on WhatsApp" → WhatsApp
  • "on Telegram" → Telegram
  • "on Slack" → Slack
  • "on Discord" → Discord
Default: WhatsApp
只需在请求中提及渠道即可:
  • "在WhatsApp上" → WhatsApp
  • "在Telegram上" → Telegram
  • "在Slack上" → Slack
  • "在Discord上" → Discord
默认渠道:WhatsApp

Default Messages

默认消息内容

The skill auto-generates appropriate messages:
TypeDefault Message
IkigaiMorning journal with purpose, food, movement, connection, gratitude
Water"💧 Time to drink water! Stay hydrated! 🚰"
Morning"🌅 Good morning! Time for your daily check-in."
Evening"🌙 Evening check-in! How was your day?"
WeeklyWeekly goals review
Default"⏰ Your scheduled reminder is here!"
该Skill会自动生成合适的消息:
类型默认消息
Ikigai包含目标、饮食、运动、社交、感恩的晨间日记提示
喝水"💧 该喝水了!保持充足水分!🚰"
晨间"🌅 早上好!是时候进行每日签到了。"
晚间"🌙 晚间签到!今天过得怎么样?"
周度周度目标回顾提示
默认"⏰ 你的定时提醒已送达!"

How It Works

工作流程

  1. Install the skill (see Quick Install above)
  2. Chat naturally: "Create a daily reminder at 8am"
  3. Done! The cron job is created automatically
  1. 安装该Skill(见上方快速安装)
  2. 自然对话:例如“创建每天早上8点的提醒”
  3. 完成! cron任务会自动创建

For Developers

开发者指南

Files

文件说明

  • SKILL.md
    - This documentation
  • scripts/cron_creator.py
    - Natural language parser
  • install.sh
    - Automatic installer script
  • SKILL.md
    - 本技能文档
  • scripts/cron_creator.py
    - 自然语言解析器
  • install.sh
    - 自动安装脚本

The Parser

解析器说明

The
cron_creator.py
script:
  • Extracts time, frequency, channel, destination from natural language
  • Generates appropriate
    clawdbot cron add
    command
  • Returns JSON with parsed fields and command
cron_creator.py
脚本:
  • 从自然语言中提取时间、频率、渠道、接收方信息
  • 生成对应的
    clawdbot cron add
    命令
  • 返回包含解析字段和命令的JSON数据

Manual Testing

手动测试

bash
undefined
bash
undefined

Test the parser

测试解析器

python3 scripts/cron_creator.py "Create a daily reminder at 8:45am"
python3 scripts/cron_creator.py "Create a daily reminder at 8:45am"

Output includes:

输出内容包括:

- parsed time, frequency, channel

- 解析后的时间、频率、渠道

- generated cron expression

- 生成的Cron表达式

- full clawdbot cron add command

- 完整的clawdbot cron add命令

undefined
undefined

Configuration

配置说明

The install script automatically configures:
  • Clawdbot tools.exec.host=gateway (allows running clawdbot commands)
  • Skill files in ~/.clawdbot/skills/cron-creator
  • Gateway restart to apply changes
安装脚本会自动配置以下内容:
  • Clawdbot tools.exec.host=gateway(允许执行clawdbot命令)
  • 技能文件存储在~/.clawdbot/skills/cron-creator目录
  • 重启网关以应用配置变更

Troubleshooting

故障排除

Skill not loading?
bash
clawdbot skills list | grep cron
Cron not created?
bash
undefined
技能未加载?
bash
clawdbot skills list | grep cron
Cron任务未创建?
bash
undefined

Check clawdbot is running

检查Clawdbot是否运行

clawdbot status
clawdbot status

Check cron jobs

查看Cron任务列表

clawdbot cron list

**Need to reinstall?**
```bash
clawdbot cron list

**需要重新安装?**
```bash

Run install again

再次运行安装命令

GitHub

GitHub地址

Report issues or contribute there!
欢迎在此提交问题或贡献代码!