Complete AI TrainingYourJobSkills for your job

Skills / agent-orchestration

agent-self-scheduling

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

newOperations & Supply ChainAI & Automationagentsautomationcronscheduling

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

Subscribers only

The full skill, its 1 bundled files and every download is included with every paid Complete AI plan.

Details

Sourcedavidondrej/skills
LicenseMIT
Risk labelcritical ("critical" means the skill may run commands or touch files — read before use)
FilesSKILL.md
Added2026-07-07

Related skills

agy-delegate

Delegate coding tasks to the Google Antigravity CLI (`agy`) only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.

aider-delegate

Delegate coding tasks to Aider (`aider`) only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.

claude-delegate

Delegate coding tasks to a separate Claude Code CLI process or Claude session only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.

cline-delegate

Delegate coding tasks to the Cline CLI (`cline`) only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.

codex-delegate

Delegate coding tasks to the OpenAI Codex CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.

codex-subagent

Launch Codex CLI as an isolated subagent for bounded coding, review, or verification tasks.