agent-self-scheduling

Featured

Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.

AI & Automation 43,990 stars 6492 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Agent Self-Scheduling ## When to Use - Use when the user asks for recurring, scheduled, heartbeat, or looped agent work. - Use when you need to choose between cron, external schedulers, hooks, or built-in agent scheduling. First question: does the agent have a built-in scheduler (Hermes → Camp B), or do you own the clock (everything else → Camp A)? Universal floor: cron is 1 minute minimum (5-field expr, no seconds) — every camp. For sub-minute you MUST use a `while ...; sleep N; done` loop, a TS extension, or an event hook. Never put an LLM on a tight timer. ## Camp A — one-shot agents, you own the clock These run once and exit (amnesiac unless resumed). Schedule them externally. ```bash claude -p "PROMPT" --output-format json --allowedTools "Read,Edit,Bash" # Claude Code codex exec --json "PROMPT" # Codex pi run "PROMPT" # Pi ``` Wrap in a clock: ```bash # 1. cron (>= 1 min floor) */10 * * * * cd /path/to/project && pi run "check X and report" >> ~/agent.log 2>&1 # 2. systemd timer (Linux, survives reboot, better logging) — OnUnitActiveSec=10min # 3. dumb loop (sub-minute, or no cron available) while true; do pi run "check X"; sleep 30; done ``` Gotchas (each breaks unattended runs if ignored): - **Permissions hang forever.** Pass `--allowedTools` (Claude) or sandbox/auto-approve flags (Codex), or the run blocks on a prompt. - **Use JSON output** (`--output-...

Details

Author
sickn33
Repository
sickn33/agentic-awesome-skills
Created
6 months ago
Last Updated
today
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category