Scheduled Tasks: headless Claude sessions on a timer (Cowork-style) #2
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
infra-audit
monitoring
operations
proxmox
script
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/claude-home#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Build a scheduled task system that runs headless Claude Code sessions on a timer, inspired by MacOS Claude Cowork's scheduled tasks feature. Uses systemd timers to trigger
claude -pwith task-specific prompts, scoped to the appropriate project and cognitive-memory graph.Motivation
Design Decisions Needed
1. Task Definition Format
How do we define scheduled tasks? Options:
~/.config/claude-scheduled/tasks.yaml) listing all tasks with schedule, prompt, working dir, graph, limits2. Headless Session Requirements
claude -pwork from a systemd unit (no TTY)?--model,--max-turns,--allowedTools, etc.)--allowedToolsto restrict what the session can do?3. Output & Reporting
Where do task results go?
~/.local/share/claude-scheduled/logs/)4. Cost & Safety Guardrails
5. Working Directory & Context
cdinto the right project repo so CLAUDE.md loads6. Scheduling
OnCalendar=*-*-* 08:00:00)Example Tasks (Initial Set)
Architecture Sketch
Potential Blockers
claude -pworks from systemd without TTY/interactive logingit push --forceunattendedPrior Art
Next Steps
claude -pworks from systemd (quick spike)May become its own repo if scope grows beyond claude-home.
The scheduled task system is fully implemented (runner.sh, systemd units, tasks). This PR adds documentation to the claude-home repo:
scheduled-tasks/CONTEXT.md— documents both execution patterns (runner.sh template framework + custom dispatcher scripts), all active tasks, settings reference, auth, monitoring, and cost safetyCLAUDE.md— updated routing table so the context loads automatically when scheduled-task topics come upPR: #6