agent-self-scheduling
FeaturedSchedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.
AI & Automation 46,271 stars
6746 forks Updated 2 days ago MIT
Install
Quality Score: 99/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
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
- 7 months ago
- Last Updated
- 2 days ago
- Language
- Python
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
agent-self-scheduling
Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.
0 Updated 4 days ago
mytricker0 AI & Automation Listed
schedule-agent-work
Choose and design one-shot, recurring, event-triggered, monitored, CI, background, queue, or board-based agent work. Use when agent work must run later, repeat, survive the current thread, or deliver results through an explicit route.
7 Updated 2 weeks ago
gaelic-ghost AI & Automation Listed
schedule
Use when scheduling recurring cron jobs or one-shot background notifications
4 Updated today
imMamdouhaboammar