agent-self-scheduling

Configure AI coding agents to run on schedules using cron, systemd timers, loops, or the Hermes scheduler daemon.

60|11|Updated Jun 15, 2026
One-click install
npx skills add https://github.com/matyasstoch/david-skills --skill agent-self-scheduling-matyasstoch
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-self-scheduling
Source: https://github.com/matyasstoch/david-skills/tree/main/skills/autonomous-ai-agents/agent-self-scheduling
Command: npx skills add https://github.com/matyasstoch/david-skills --skill agent-self-scheduling-matyasstoch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running an AI coding agent periodically without manual launching is tricky: most agents are one-shot and amnesiac, cron cannot go below one minute, and unattended runs silently hang on permission prompts. This Skill provides a decision framework and concrete commands for scheduling agents reliably. ## Core Features & Use Cases - Two-camp decision framework: Choose between wrapping one-shot agents (Claude Code, Codex, Pi) in an external clock versus using Hermes with its built-in scheduler daemon. - External clock patterns: Cron entries, systemd timers, and while-sleep loops for sub-minute intervals, with JSON output and tool allowlists for unattended execution. - Hermes recurring jobs: Create cron-expression, interval, or one-shot jobs with zero-token script mode, job chaining, self-terminating loops, and loop-safety guards. - Use Case: You want an agent to check a task list every 5 minutes and only act on due items. Use the heartbeat pattern with a recurring Hermes job or a while-sleep loop that stays silent when nothing is due. ## Quick Start Ask the agent to set up a recurring job that runs a specific prompt every 10 minutes and verify it fires by checking the log or job list.

Frequently Asked Questions about agent-self-scheduling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule an AI agent to run every few minutes?▼

Wrap a one-shot invocation like claude -p or codex exec in cron for intervals of one minute or more, or use a while-sleep loop for sub-minute timing. Alternatively, Hermes provides a built-in scheduler daemon that runs recurring jobs in isolated sessions.

Cron vs systemd timer vs while loop for agent scheduling?▼

Cron handles intervals of one minute or more with five-field expressions. Systemd timers survive reboots with better logging on Linux. While-sleep loops are required for sub-minute intervals since cron cannot go below one minute.

Can cron run a job every 30 seconds?▼

No, cron has a one-minute floor with five-field expressions and no seconds field. For sub-minute or sub-second intervals, use a while true sleep loop, a TypeScript extension, or an event-driven webhook instead of a timer.

Why does my scheduled agent run hang without output?▼

Unattended runs hang on permission prompts when tool allowlists are missing. Pass --allowedTools for Claude Code or a sandbox auto-approve flag for Codex, and use structured JSON output so the wrapper can parse results deterministically.

Does a scheduled agent remember previous runs?▼

No, each scheduled run starts as a fresh amnesiac session with no chat history. Persist state to a file the next run reads, resume explicitly with codex exec resume --last, or pass all needed context in the prompt.

Can a scheduled Hermes job create more cron jobs?▼

No, Hermes enforces loop safety so cron-run sessions cannot create additional cron jobs, preventing runaway recursion. Schedule new jobs from an interactive session instead of from inside a scheduled job.