
Agent Self-Scheduling
FreeAutomate your AI agent runs with cron and loops.
Free · Opens the source repo
What Agent Self-Scheduling does
Agent Self-Scheduling is a skill designed for automating the execution of AI agents at specified intervals, utilizing cron jobs, loops, or external clocks. This skill is particularly useful for developers and designers who need to implement recurring tasks or scheduled operations without relying on tight timers, which can lead to unsafe execution scenarios. By leveraging cron for scheduling, users can ensure that their agents perform tasks such as checking statuses or generating reports at regular intervals, thereby enhancing productivity and efficiency.
The skill is structured around two primary operational camps: Camp A, where users own the clock and run one-shot agents, and Camp B, which utilizes Hermes' built-in scheduler. In Camp A, users can schedule tasks using cron or systemd timers, or implement a simple loop for sub-minute intervals. This flexibility allows for a variety of scheduling needs, whether for simple checks or more complex workflows. Conversely, Camp B takes advantage of Hermes' capabilities, allowing for more advanced scheduling options, such as zero-token mode and chaining of tasks, which can streamline operations significantly.
One of the key features of this skill is its focus on safety and reliability. It emphasizes the importance of avoiding tight timers, which can lead to issues if an agent hangs or encounters permission prompts. The skill provides clear guidelines on how to set up logging and verify that scheduled tasks are firing as expected. This attention to detail ensures that users can trust their automated processes to run smoothly without unexpected interruptions. Overall, Agent Self-Scheduling is an essential tool for anyone looking to automate AI agent operations effectively and safely.
When to use it
Use this skill when you need to set up recurring tasks for your AI agents, especially when you want to avoid tight execution intervals.
When not to use it
This skill may not be suitable for one-off tasks that do not require scheduling or for environments where cron or external scheduling is not available.
What you can build with it
Scheduled Status Checks
Set up an agent to check system statuses every hour using cron, ensuring timely updates.
Automated Reporting
Use the skill to generate daily reports by scheduling an agent to run every morning.
Heartbeat Monitoring
Implement a heartbeat pattern to regularly check on task statuses and only act when necessary.
How to install Agent Self-Scheduling
View source1. Install with the skills CLI
npx skills add sickn33/agentic-awesome-skills/agent-self-scheduling --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by sickn33Agent 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)
- Camp A: log file grows after one interval, or run the wrapped command once by hand → clean JSON, exit 0.
- Camp B:
hermes cron listshows the job + sanenext_run; trigger a run-now to confirm delivery. - Confirm permission/sandbox flags are present — the #1 silent failure is a hung permission prompt.
- 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.
Frequently asked questions about Agent Self-Scheduling
Similar skills
Agent-Browser Core
Efficient browser automation for AI agents.
Setup My IQ
Effortlessly create and update your personal context portfolio.
CRM Maintenance
Automate HubSpot updates from your calendar and emails.
Zoom MCP
Streamline access to Zoom meeting assets and recordings.
Slack Automation
Automate tasks and extract data from Slack easily.
SMB Onboard
Guides small business owners through initial tool setup.
