Agent Skillsrcarmo/piclaw › schedule

schedule

GitHub

提供任务调度功能,支持单次、定时或间隔执行。优先使用结构化工具创建计划任务,兼容旧版别名及 IPC 文件回退机制,并包含验证查询与响应格式规范。

runtime/skills/builtin/schedule/SKILL.md rcarmo/piclaw

Trigger Scenarios

用户要求设置定时提醒 需要安排周期性或延迟执行的任务

Install

npx skills add rcarmo/piclaw --skill schedule -g -y
More Options

Non-standard path

npx skills add https://github.com/rcarmo/piclaw/tree/main/runtime/skills/builtin/schedule -g -y

Use without installing

npx skills use rcarmo/piclaw@schedule

指定 Agent (Claude Code)

npx skills add rcarmo/piclaw --skill schedule -a claude-code -g -y

安装 repo 全部 skill

npx skills add rcarmo/piclaw --all -g -y

预览 repo 内 skill

npx skills add rcarmo/piclaw --list

SKILL.md

Frontmatter
{
    "name": "schedule",
    "description": "Schedule a task to run later or on a recurring basis. Prefer the scheduled_tasks tool; use the schedule_task compatibility alias or IPC fallback only if needed.",
    "distribution": "public"
}

Schedule a Task

Prefer the built-in scheduling tool.

Preferred method

Use scheduled_tasks with action: "create".

Example:

scheduled_tasks({
  action: "create",
  chat_jid: "web:default",
  schedule_type: "once",
  schedule_value: "2026-03-09T09:00:00Z",
  task_kind: "agent",
  prompt: "Post a reminder to review the deployment"
})

Compatibility note: schedule_task(...) is the older alias if the structured tool is unavailable.

Key fields

  • schedule_type: once | cron | interval
  • schedule_value:
    • once: ISO timestamp (UTC recommended)
    • cron: cron expression
    • interval: milliseconds
  • task_kind: agent or shell
  • prompt for agent tasks
  • command for shell tasks
  • optional cwd, timeout_sec, model

IPC fallback

If tool access is unavailable, write an IPC JSON file to $PICLAW_DATA/ipc/tasks/:

cat > "$PICLAW_DATA/ipc/tasks/schedule_$(date +%s)_$$.json" <<EOF
{
  "type": "schedule_task",
  "chatJid": "$PICLAW_CHAT_JID",
  "task_kind": "agent",
  "prompt": "Describe what should happen when this task fires",
  "schedule_type": "once",
  "schedule_value": "2026-03-09T09:00:00Z"
}
EOF

For a shell task, keep the same envelope and change only the task-specific fields:

{
  "task_kind": "shell",
  "command": "ls -la /workspace",
  "cwd": ".",
  "timeout_sec": 30,
  "schedule_type": "interval",
  "schedule_value": "3600000"
}

Verify it was scheduled

SELECT id, chat_jid, task_kind, schedule_type, schedule_value, status, next_run
FROM scheduled_tasks
ORDER BY created_at DESC
LIMIT 5;

Execution history:

SELECT task_id, run_at, duration_ms, status
FROM task_run_logs
ORDER BY id DESC
LIMIT 10;

Response requirements

After creating a schedule, respond with:

  • task ID
  • schedule type
  • schedule value
  • next run time in human-readable local time, if available

Notes

  • Shell tasks are pre-validated: no newlines, no destructive patterns, and cwd must stay inside /workspace.
  • Use UTC for human-facing schedules unless the user asked for another timezone.

Environment

  • PICLAW_DATA — piclaw data directory (contains ipc/, sessions/)
  • PICLAW_CHAT_JID — JID of the triggering chat

Version History

  • 5fa0ce5 Current 2026-07-25 10:25

Same Skill Collection

runtime/skills/builtin/reload/SKILL.md
runtime/skills/builtin/remote-peer/SKILL.md
runtime/skills/builtin/script-discovery-annotation/SKILL.md
runtime/skills/builtin/send-message/SKILL.md
runtime/skills/integrations/playwright/SKILL.md
runtime/skills/operator/graphite-power-chart/SKILL.md
runtime/skills/operator/token-chart/SKILL.md
skel/.pi/skills/adaptive-cards-authoring/SKILL.md
skel/.pi/skills/bootstrap-container/SKILL.md
skel/.pi/skills/debug/SKILL.md
skel/.pi/skills/export-timeline-pdf/SKILL.md
skel/.pi/skills/extension-design/SKILL.md
skel/.pi/skills/extension-troubleshoot/SKILL.md
skel/.pi/skills/feature-refinement-flow/SKILL.md
skel/.pi/skills/feed-digest/SKILL.md
skel/.pi/skills/graph-design/SKILL.md
skel/.pi/skills/graphite-power-chart/SKILL.md
skel/.pi/skills/kanban-management/SKILL.md
skel/.pi/skills/mcp-adapter/SKILL.md
skel/.pi/skills/playwright/SKILL.md
skel/.pi/skills/reload/SKILL.md
skel/.pi/skills/remote-peer/SKILL.md
skel/.pi/skills/schedule/SKILL.md
skel/.pi/skills/script-discovery-annotation/SKILL.md
skel/.pi/skills/send-message/SKILL.md
skel/.pi/skills/setup/SKILL.md
skel/.pi/skills/situate-daily-notes/SKILL.md
skel/.pi/skills/technical-docs/SKILL.md
skel/.pi/skills/timeline-cleanup/SKILL.md
skel/.pi/skills/token-chart/SKILL.md
skel/.pi/skills/twitter-summary/SKILL.md
skel/.pi/skills/web-search-summary/SKILL.md
skel/.pi/skills/web-search/SKILL.md

Metadata

Files
0
Version
ae927fb
Hash
99f5e59f
Indexed
2026-07-25 10:25

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 15:31
浙ICP备14020137号-1 $Гость$