cron

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cron

Cron

Use the
cron
tool to schedule reminders or recurring tasks.
使用
cron
工具设置提醒或周期性任务。

Three Modes

三种模式

  1. Reminder - message is sent directly to user
  2. Task - message is a task description, agent executes and sends result
  3. One-time - runs once at a specific time, then auto-deletes
  1. 提醒模式 - 消息直接发送给用户
  2. 任务模式 - 消息为任务描述,由Agent执行并返回结果
  3. 一次性模式 - 在指定时间运行一次后自动删除

Examples

示例

Fixed reminder:
cron(action="add", message="Time to take a break!", every_seconds=1200)
Dynamic task (agent executes each time):
cron(action="add", message="Check HKUDS/vikingbot GitHub stars and report", every_seconds=600)
One-time scheduled task (compute ISO datetime from current time):
cron(action="add", message="Remind me about the meeting", at="<ISO datetime>")
List/remove:
cron(action="list")
cron(action="remove", job_id="abc123")
固定提醒:
cron(action="add", message="Time to take a break!", every_seconds=1200)
动态任务(每次由Agent执行):
cron(action="add", message="Check HKUDS/vikingbot GitHub stars and report", every_seconds=600)
一次性定时任务(根据当前时间计算ISO时间戳):
cron(action="add", message="Remind me about the meeting", at="<ISO datetime>")
列出/删除任务:
cron(action="list")
cron(action="remove", job_id="abc123")

Time Expressions

时间表达式

User saysParameters
every 20 minutesevery_seconds: 1200
every hourevery_seconds: 3600
every day at 8amcron_expr: "0 8 * * *"
weekdays at 5pmcron_expr: "0 17 * * 1-5"
at a specific timeat: ISO datetime string (compute from current time)
用户表述参数
每20分钟every_seconds: 1200
每小时every_seconds: 3600
每天早上8点cron_expr: "0 8 * * *"
工作日下午5点cron_expr: "0 17 * * 1-5"
在指定时间at: ISO datetime字符串(根据当前时间计算)