Blog ·
Most of the value of an AI agent comes from work it does without being asked: the inbox sorted before you wake up, the competitor report waiting on Monday, the failing test fixed overnight. That needs two things: a schedule, and a computer that's on when the schedule fires.
Good jobs to schedule
| Job | When | Delivered to |
|---|---|---|
| Morning brief: calendar, weather, urgent email | Weekdays, 7:00 | Telegram or WhatsApp |
| Inbox triage with drafted replies | Weekdays, 6:30 | A summary in chat, drafts in your mailbox |
| Competitor price check | Mondays, 8:00 | A dated spreadsheet, plus changes in chat |
| Weekly report from several dashboards | Fridays, 16:00 | A document, plus a link in chat |
| Dependency updates and a test run | Nightly, 2:00 | A pull request |
| Check a page for a change | Every few hours | A message only when it changes |
A rule of thumb: schedule jobs where the steps are fixed but the content changes. If both the steps and the content are fixed, a plain script is cheaper. If neither is fixed, it's not ready to run without you.
Three ways to schedule an agent
- The agent's own scheduler. OpenClaw and Hermes Agent both have one built in. Jobs run inside the agent and deliver results to your chat apps. Best for personal assistants.
- Ask in chat. With either, you can simply message “every weekday at 7, send me a brief on…” and the agent creates the scheduled job itself.
- Plain cron and a coding agent. Linux's cron runs a command on a schedule. Point it at Claude Code, Codex or OpenCode in their non-interactive mode. Best for coding and file-based jobs.
OpenClaw: cron jobs and the heartbeat
OpenClaw has two kinds of automation, both run by its gateway:
- Cron jobs run at exact times, like 7:00 every weekday. Each can run in a fresh session or in the agent's main conversation, and deliver its result to a chat app. Use them for anything with a fixed time.
- The heartbeat wakes the agent at a regular interval, every half hour or so by default, to work through a short checklist in a
HEARTBEAT.mdfile. Use it for “keep an eye on things” jobs where exact timing doesn't matter.
You can create cron jobs by asking in chat or with the openclaw cron commands, and list them with openclaw cron list. Details change between versions, so check the OpenClaw automation docs for yours.
Hermes Agent: schedules in plain English
Hermes Agent's scheduler takes both cron syntax and plain English, like “every weekday at 8am” or “every 2h”. Jobs deliver their output to Telegram, Discord and the other platforms its gateway connects to.
Two things to know. Scheduled jobs run in a fresh session, with no memory of your current chat, so the job's prompt must contain everything it needs. And the gateway must be running for jobs to fire. On Cubicles, Hermes runs its gateway in the background once it's connected to a chat app; without one, it only runs while you're using it.
Plain cron with a coding agent
For coding jobs, or anything that works on files, cron plus a coding agent's non-interactive mode is simple and dependable. Put the work in a small script first, then schedule the script:
#!/usr/bin/env bash
set -euo pipefail
source ~/.agent-env # exports PATH and ANTHROPIC_API_KEY
cd ~/code/my-app
git pull --ff-only
claude -p "Run the test suite. If anything fails, find the cause and write a short report to ~/reports/tests-$(date +%F).md. Don't push or open pull requests." \
--allowedTools "Bash,Read,Write,Edit"0 2 * * * ~/jobs/nightly-tests.sh >> ~/logs/nightly-tests.log 2>&1The Codex equivalent is codex exec "…", and OpenCode's is opencode run "…". Three cron gotchas catch almost everyone:
- Cron starts with an almost empty environment. Your PATH and API keys from your shell aren't there. Load them in the script, as above.
- `%` means something special in a crontab line. Keep commands with dates in a script, not in the crontab itself.
- Log everything. Without the
>> …log 2>&1, a failed run leaves no trace.
Write prompts that run without you
A scheduled prompt has no one to ask when something's unclear. Write it like a note to a new colleague who'll do the job alone at 3am:
- Self-contained. Everything it needs: what to check, where, what counts as important. Don't rely on last week's chat.
- A clear output. A file name with the date, and exactly what to send you.
- What to do when there's nothing new. Often: send nothing. A daily “no changes” message trains you to ignore it.
- Limits. What it must never do on a scheduled run, like sending, buying, deleting or merging.
- When to stop and ask. “If a site asks you to sign in, stop and message me.”
“Every Monday at 8:00: open the pricing pages listed in ~/research/competitors.md and record each plan's name and monthly price in ~/research/prices-YYYY-MM-DD.csv, using today's date. Compare with the most recent previous file. If any price changed, or a plan was added or removed, message me on Telegram with just those changes and a link to each page. If nothing changed, don't message me. If a page fails to load or asks for a sign-in, say so in the message instead of guessing.”
Keep scheduled jobs cheap
Scheduled jobs are where model bills creep up, because they run whether or not you're paying attention. A heartbeat every 30 minutes is 48 runs a day. A check every 5 minutes is 288.
- Run as rarely as the job allows. Daily is plenty for most things people schedule hourly.
- Use a smaller model for routine checks, and a strong one only for the hard work.
- Skip early when nothing changed. Have a cheap script check for changes first, and only wake the agent when there's something to do.
- Set a monthly spending limit with your model provider.
More ways to trim the bill are in how much it costs to run an AI agent.
The computer has to be awake
A schedule is only as reliable as the computer it runs on. On a laptop, the 7:00 brief silently doesn't happen because the lid was closed. Updates, power cuts and Wi‑Fi drops do the same to a machine at home.
On Cubicles, each agent has its own cloud computer that keeps running when you close the tab, so jobs fire on time. Sign up and choose New agent to set up OpenClaw or Hermes with a chat app; it gets a computer of its own, and your first is free. Then ask it for your first scheduled job. If you put a computer to sleep, its files are kept but its jobs won't run until you wake it. For more on keeping an agent running, read how to run an AI agent 24/7.
Frequently asked questions
Can OpenClaw run tasks on a schedule?
Yes. OpenClaw has built-in cron jobs for exact times and a heartbeat for regular check-ins. You can create jobs by asking it in chat or with its cron commands, and it can deliver results to your chat apps.
Does Hermes Agent support scheduled tasks?
Yes. Its scheduler accepts cron syntax or plain English, such as every weekday at 8am, and delivers results to your chat apps. Scheduled jobs run in a fresh session and need its gateway running.
What happens if my computer is off when a job is due?
Usually the run is missed, or happens late once the computer is back, depending on the scheduler. For dependable schedules, run the agent on a computer that stays on.
How often should a scheduled agent run?
As rarely as the job allows. Daily or weekly suits most jobs. Frequent checks multiply the model bill, so use a small model or a cheap script to check for changes first.
Can I schedule Claude Code or Codex?
Yes. Run Claude Code with claude -p, Codex with codex exec or OpenCode with opencode run from a script, and schedule the script with cron. Load your API key and PATH in the script, since cron doesn't.