/agent-self-scheduling
Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.
$ npx -y skills add sickn33/antigravity-awesome-skills --skill agent-self-scheduling --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/agent-self-scheduling
Context preview
The summary Claude sees to decide when to auto-load this skill.
Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.
SKILL.md
agent-self-scheduling.SKILL.mdname: agent-self-scheduling
description: "Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers."
category: agent-orchestration
risk: critical
source: community
source_repo: davidondrej/skills
source_type: community
date_added: "2026-07-07"
author: davidondrej
tags: [agents, scheduling, automation, cron]
tools: [claude, codex]
license: "MIT"
license_source: "https://github.com/davidondrej/skills/blob/main/LICENSE"
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.
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:
# 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-format json` / `--json`) so the wrapper parses results deterministically.
- **Runs are amnesiac.** Resume (`codex exec resume --last`) or persist state to a file the next run reads.
Pi has NO built-in scheduler/loop/heartbeat by design — external clock only (or a TS extension for agent-side timers).
cmux — orchestration only, NO scheduler
cmux has no timer/watch/cron. Three ways to loop it: orchestrator-driven (`send` → `sleep` → `read-screen` on your own clock), a dumb while-sleep wrapper, or — preferred — event-driven via `cmux notify` + OSC terminal hooks, which is cheaper and more responsive than polling. `read-screen` is non-interruptive, safe to poll.
If a loop checks another agent, send the user a one-line status each check: what the agent is doing, on track or not. (Claude Code may prefill a predicted next user message after finishing — that's Claude, not the user.)
Camp B — Hermes built-in scheduler
Hermes' gateway ticks every 60s and runs due jobs in fresh isolated sessions. State-check first:
hermes gateway install # user-level ( --system to survive reboot)
hermes cron create "every 1h" "summarize new emails and report" --skill himalaya
hermes cron create "0 9 * * *" "post daily standup" # cron expr
hermes cron create "30m" "one-shot reminder in 30 min" # one-shot delay
Hermes-unique: **zero-token mode** (run a script, deliver stdout verbatim — use for watchdogs), **chaining** (`context_from` pipes one job's output into the next), **self-terminating loops**, and **loop safety** (scheduled sessions cannot create more cron jobs — don't schedule from inside a scheduled job). Each run is a fresh session: the prompt must carry all context.
Heartbeat pattern
One fast recurring tick gates many slower per-task checks: the tick reads a task list + per-task `last_run` timestamps and only acts on tasks that are due. In Hermes use a recurring job (zero-token mode when nothing's due); in Camp A use a while-sleep loop. Define active-hours, and stay silent when nothing is due — no empty noise.
Verify it fires (before reporting success)
1. Camp A: log file grows after one interval, or run the wrapped command once by hand → clean JSON, exit 0. 2. Camp B: `hermes cron list` shows the job + sane `next_run`; trigger a run-now to confirm delivery. 3. Confirm permission/sandbox flags are present — the #1 silent failure is a hung permission prompt. 4. Heartbeats: confirm a nothing-due tick stays silent.
Limitations
- Adapted from `davidondrej/skills`; verify local paths, tools, credentials, and agent features before acting.
- For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.
Read more
name: agent-self-scheduling description: "Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers." category: agent-orchestration risk: critical source: community source_repo: davidondrej/skills source_type: community date_added: "2026-07-07" author: davidondrej tags: [agents, scheduling, automation, cron] tools: [claude, codex] license: "MIT" license_source: "https://github.com/davidondrej/skills/blob/main/LICENSE"
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.
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:
# 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-format json` / `--json`) so the wrapper parses results deterministically.
- **Runs are amnesiac.** Resume (`codex exec resume --last`) or persist state to a file the next run reads.
Pi has NO built-in scheduler/loop/heartbeat by design — external clock only (or a TS extension for agent-side timers).
cmux — orchestration only, NO scheduler
cmux has no timer/watch/cron. Three ways to loop it: orchestrator-driven (`send` → `sleep` → `read-screen` on your own clock), a dumb while-sleep wrapper, or — preferred — event-driven via `cmux notify` + OSC terminal hooks, which is cheaper and more responsive than polling. `read-screen` is non-interruptive, safe to poll.
If a loop checks another agent, send the user a one-line status each check: what the agent is doing, on track or not. (Claude Code may prefill a predicted next user message after finishing — that's Claude, not the user.)
Camp B — Hermes built-in scheduler
Hermes' gateway ticks every 60s and runs due jobs in fresh isolated sessions. State-check first:
hermes gateway install # user-level ( --system to survive reboot) hermes cron create "every 1h" "summarize new emails and report" --skill himalaya hermes cron create "0 9 * * *" "post daily standup" # cron expr hermes cron create "30m" "one-shot reminder in 30 min" # one-shot delay
Hermes-unique: **zero-token mode** (run a script, deliver stdout verbatim — use for watchdogs), **chaining** (`context_from` pipes one job's output into the next), **self-terminating loops**, and **loop safety** (scheduled sessions cannot create more cron jobs — don't schedule from inside a scheduled job). Each run is a fresh session: the prompt must carry all context.
Heartbeat pattern
One fast recurring tick gates many slower per-task checks: the tick reads a task list + per-task `last_run` timestamps and only acts on tasks that are due. In Hermes use a recurring job (zero-token mode when nothing's due); in Camp A use a while-sleep loop. Define active-hours, and stay silent when nothing is due — no empty noise.
Verify it fires (before reporting success)
1. Camp A: log file grows after one interval, or run the wrapped command once by hand → clean JSON, exit 0. 2. Camp B: `hermes cron list` shows the job + sane `next_run`; trigger a run-now to confirm delivery. 3. Confirm permission/sandbox flags are present — the #1 silent failure is a hung permission prompt. 4. Heartbeats: confirm a nothing-due tick stays silent.
Limitations
- Adapted from `davidondrej/skills`; verify local paths, tools, credentials, and agent features before acting.
- For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.
Local, agent-owned skill stacks for coding agents—from complete catalog access to a reproducible, reviewable plan. Codex or Claude inspects your project and chooses exact skills from the complete local AAS catalog.
Other skills on agentic-awesome-skills.
- /00-andruia-consultant
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
Open skill - /007
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
Open skill - /10-andruia-skill-smith
Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.
Open skill - /20-andruia-niche-intelligence
Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.
Open skill - /2slides-ppt-generator
AI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize documents into decks, add AI voice narration, and export pages/audio. Use for any \"make slides\", \"create a deck\", or \"slides from this document\"
Open skill - /3d-web-experience
Expert in building 3D experiences for the web - Three.js, React
Open skill

