Skip to content

Comments

Add schedule skill for managing cron-based agent tasks#69

Merged
jlia0 merged 4 commits intomainfrom
claude/add-schedule-agent-skill-3U6Qx
Feb 14, 2026
Merged

Add schedule skill for managing cron-based agent tasks#69
jlia0 merged 4 commits intomainfrom
claude/add-schedule-agent-skill-3U6Qx

Conversation

@jlia0
Copy link
Collaborator

@jlia0 jlia0 commented Feb 14, 2026

Summary

Introduces a new "schedule" skill that enables users to create, list, and delete cron-based scheduled tasks. These tasks automatically send messages to the tinyclaw incoming queue at specified intervals, triggering target agents to perform recurring work.

Key Changes

  • schedule.sh CLI tool — Bash script providing three main commands:

    • create — Set up a new cron job with a 5-field cron expression, target agent, and task message
    • list — Display all tinyclaw schedules, optionally filtered by agent
    • delete — Remove schedules by label or delete all at once
  • Cron integration — Schedules are stored as system crontab entries tagged with # tinyclaw-schedule:<label> comments for reliable identification and management

  • Queue message generation — When a cron job fires, it writes a JSON message to queue/incoming/ with proper routing (@agent_id prefix) so the queue processor invokes the correct agent

  • SKILL.md documentation — Comprehensive guide covering:

    • Command syntax and flags
    • Workflow for creating schedules
    • Cron expression quick reference with common patterns
    • Practical examples (daily reports, health checks, weekly reviews)
  • queue-format.md reference — Documents the JSON schema for scheduled task messages, including field descriptions and routing behavior

Implementation Details

  • Auto-generates descriptive labels if not provided (format: sched-<timestamp>-<pid>)
  • Validates cron expressions have exactly 5 fields before creating
  • Prevents duplicate labels by checking existing crontab entries
  • Supports customizable channel, sender, and message fields for flexibility
  • Self-contained cron commands that don't require external dependencies beyond bash
  • Gracefully handles missing crontab entries and empty schedule lists

https://claude.ai/code/session_01YA1x7fWbY9bYx2Djfk2B8T

Adds a new skill that lets agents create, list, and delete cron jobs
that send messages to the tinyclaw incoming queue with task context
and target agent routing.

https://claude.ai/code/session_01YA1x7fWbY9bYx2Djfk2B8T
- Replace grep -P (Perl regex) with POSIX-compatible sed for macOS
  BSD grep compatibility
- Add platform detection to exit early with a clear message on Windows
  (CYGWIN, MINGW, MSYS)

https://claude.ai/code/session_01YA1x7fWbY9bYx2Djfk2B8T
Replace schedule.sh (crontab-dependent) with schedule.py (pure Python 3,
no external deps). Key changes:

- Schedules stored in ~/.tinyclaw/schedules.json instead of system crontab
- Built-in scheduler daemon via `run` command (60s check loop)
- Pure-Python cron expression parser (wildcards, ranges, steps, lists)
- Works on macOS, Linux, and Windows without any system dependencies

https://claude.ai/code/session_01YA1x7fWbY9bYx2Djfk2B8T
@jlia0 jlia0 merged commit 941302a into main Feb 14, 2026
@jlia0 jlia0 deleted the claude/add-schedule-agent-skill-3U6Qx branch February 14, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants