Agent Skills
› espressif/esp-claw
› cap_scheduler
cap_scheduler
GitHub用于管理基于定时器的调度规则,支持增删改查、启用禁用、暂停恢复及立即触发等操作。适用于列表查询、规则配置、状态控制及定时自动化场景。
Trigger Scenarios
用户请求列出当前调度任务
用户需要添加、更新或删除定时规则
用户要求暂停、恢复或启用/禁用特定调度器
用户希望立即触发某个调度任务
Install
npx skills add espressif/esp-claw --skill cap_scheduler -g -y
SKILL.md
Frontmatter
{
"name": "cap_scheduler",
"metadata": {
"cap_groups": [
"cap_scheduler"
],
"manage_mode": "readonly"
},
"description": "Manage scheduler rules: list\/get\/add\/update\/remove\/enable\/disable\/pause\/resume\/trigger\/reload."
}
Scheduler Management
Use this skill when the user needs to inspect or control timer-based schedule rules.
When to use
- The user asks to list current schedules.
- The user asks to add, update, or remove a schedule.
- The user asks to pause, resume, enable, disable, trigger, or reload a schedule.
- The user asks for a timer-based reminder, periodic check, timed automation, or scheduled agent wake-up.
Available capabilities
scheduler_list: list all scheduler entries and runtime state.scheduler_get: get one scheduler entry byid.scheduler_add: add one scheduler entry fromschedule_jsonstring.scheduler_update: update one scheduler entry fromschedule_jsonstring.scheduler_remove: remove one scheduler entry byid.scheduler_enable: enable one scheduler entry byid.scheduler_disable: disable one scheduler entry byid.scheduler_pause: pause one scheduler entry byid.scheduler_resume: resume one scheduler entry byid.scheduler_trigger_now: trigger one scheduler entry immediately.scheduler_reload: reload scheduler definitions from disk.
Calling rules
scheduler_addandscheduler_updateinput must be:
{
"schedule_json": "<JSON string of one scheduler entry object>"
}
schedule_jsonis a JSON string, not an object.- Use a stable, unique
id.scheduler_addfails if the id already exists.scheduler_updaterequires the id to already exist. scheduler_get,scheduler_remove,scheduler_enable,scheduler_disable,scheduler_pause,scheduler_resume, andscheduler_trigger_nowtake:
{
"id": "schedule_id"
}
schedule_json object fields
- Required fields:
id: schedule unique id.kind: one ofonce,interval, orcron.
enabled: whether the schedule is active. Defaults totrue.start_at_ms: absolute Unix epoch timestamp in milliseconds. Required foronce. Optional forinterval.end_at_ms: optional stop time in Unix epoch milliseconds foronceorinterval.interval_ms: interval period in milliseconds. Required forinterval.cron_expr: 5-field cron expression forcron, in the formminute hour mday month wday.event_type: event type published to the router. Defaults toschedule.event_key: logical key for router matching and tracing. Defaults toid.source_channel: event source channel. Defaults totime.chat_id: optional target chat id when downstream router actions need one.content_type: event content type. Defaults totrigger.session_policy: one oftrigger,chat,global,ephemeral,nosave. Defaults totrigger.text: optional event text payload. For agent wake-up rules, use this as the instruction text.payload_json: optional structured payload. Defaults to{}. It may be written either as a JSON string or as a JSON object in the item itself.max_runs: max trigger count.0means unlimited.
Time semantics
- Use
oncefor one-shot execution at a specific absolute time. - Use
intervalfor relative periodic execution such as "every 10 seconds" or "every 5 minutes". - An
intervalschedule withoutstart_at_msandend_at_mscan run before wall-clock time is synchronized. - Use
cronfor wall-clock aligned repeated execution such as "every day at 08:00" or "every Monday". crondepends on valid local time and uses the device's current local timezone.- Supported cron field forms are only
*,*/N, or one explicit number in range. More complex cron syntax such as ranges, lists, or names is not supported. - Only 5 cron fields are supported. Do not pass a 6-field expression with seconds.
Runtime behavior
- Scheduler entries only publish events. They do not define post-trigger behavior by themselves.
- At trigger time the scheduler builds an event payload containing:
schedule_idplanned_time_msfire_time_mskindrun_countuser_payload
- If a schedule is late by more than one scheduler tick, the runtime counts it as missed and advances to the next fire time instead of replaying all missed runs.
scheduler_trigger_nowpublishes the event immediately and then refreshes future runtime state. It does not delete the schedule definition.
Integration note
- Scheduler rules only define when an event is published.
- Any post-trigger behavior such as sending a message, running the agent, or calling another capability must be configured elsewhere.
- Router rule are introduced in
cap_router_mgrskill, not in this skill.
Recommended workflow
- Use
scheduler_listorscheduler_getto inspect current state and avoid id conflicts. - Choose the time kind:
once,interval, orcron. - Add or update one scheduler entry with a stable
event_key. - Active
cap_router_mgrskill and write router rules.
Common failure causes
- Passing
schedule_jsonas an object instead of a string. - Omitting required fields for the chosen kind, such as missing
start_at_ms,interval_ms, orcron_expr. - Using a 6-field cron expression or unsupported cron syntax.
- Assuming the scheduler itself will send messages or run follow-up actions.
Examples
interval
Trigger every 30 seconds, 3 times in total.
{
"schedule_json": "{\"id\":\"drink_reminder_30s\",\"enabled\":true,\"kind\":\"interval\",\"interval_ms\":30000,\"event_type\":\"schedule\",\"event_key\":\"drink_reminder\",\"source_channel\":\"time\",\"chat_id\":\"group:example\",\"content_type\":\"trigger\",\"session_policy\":\"trigger\",\"text\":\"drink reminder tick\",\"payload_json\":{\"message\":\"time to drink water\"},\"max_runs\":3}"
}
cron
Trigger every day at 08:00.
{
"schedule_json": "{\"id\":\"daily_agent_check\",\"enabled\":true,\"kind\":\"cron\",\"cron_expr\":\"0 8 * * *\",\"event_type\":\"schedule\",\"event_key\":\"daily_agent_check\",\"source_channel\":\"time\",\"chat_id\":\"group:example\",\"content_type\":\"trigger\",\"session_policy\":\"trigger\",\"text\":\"Please check the weather today and tell me what I should prepare for going out.\",\"payload_json\":{},\"max_runs\":0}"
}
once
Trigger once at a specific timestamp.
{
"schedule_json": "{\"id\":\"bootstrap_once\",\"enabled\":true,\"kind\":\"once\",\"start_at_ms\":1893456000000,\"event_type\":\"schedule\",\"event_key\":\"bootstrap_once\",\"source_channel\":\"time\",\"content_type\":\"trigger\",\"session_policy\":\"trigger\",\"text\":\"bootstrap once\",\"payload_json\":{\"task\":\"bootstrap\"},\"max_runs\":1}"
}
Pause a schedule
{
"id": "sedentary_reminder"
}
Version History
- 06eb576 Current 2026-07-24 19:54


