Scheduled AI agents on your own server

Scheduled AI agents do recurring work on their own: a digest every Monday, a check every night, a summary every morning. Agenhood runs them on your own server, and each agent remembers what it did last time.

What can scheduled AI agents do?

  • A weekly competitor digest. Every Monday, an agent reads your competitors' sites and changelogs, compares them with last week's notes and tells you what changed.
  • A nightly dependency check. One agent scans your repo for outdated or risky packages. A second turns its report into upgrade notes.
  • A morning inbox summary. On weekdays at 07:30, an agent summarizes overnight email and puts what needs a reply on top.

How to run AI agents on a schedule

  1. Create an agent and give it the tools it needs, such as web search or your mail.
  2. Save the prompt it should run.
  3. Pick when it runs: once, hourly, daily, on chosen weekdays or monthly, in your timezone.

That's it. The console shows upcoming runs on a calendar, and you can pause a schedule at any time. One prompt can serve several schedules, each with its own values, such as one digest per product.

Terminal
# Every Monday at 08:00, Berlin time
curl -X POST http://localhost:5173/v1/scheduled-tasks \
  -H "Authorization: Bearer tk_live_seedkey" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Weekly competitor digest",
    "target": {"kind": "prompt", "container_id": "'"$AGENT_ID"'", "prompt_id": "'"$PROMPT_ID"'",
               "variables": {"competitors": "Acme, Globex, Initech"}},
    "schedule": {"kind": "recurring", "unit": "week", "time": "08:00", "weekdays": [1]},
    "timezone": "Europe/Berlin"
  }'

Recurring AI agent tasks with more than one step

Some jobs need more than one agent. Chain steps into a workflow, where one agent researches and another writes, and files pass from one step to the next. A schedule can run the whole workflow.

Agents that remember the last run

Each agent keeps its files between runs, so tonight's job can pick up where last night's left off. A digest agent keeps last week's notes and reports only what changed. Between runs, the agent pauses and uses no resources. See long-running AI agents.

Better than an AI agent cron job

A cron job that calls a model API is fine for one simple task. It gets hard once the job needs to browse the web, keep notes, hand work to a second step and tell you when it fails. Agenhood gives you all of that, so you aren't building it around a crontab. Each schedule shows how its last run went, and a server outage won't replay a pile of missed runs when it comes back.

Schedules are one part of a full self-hosted AI agent platform. Coding agents can run on schedules too: see self-hosted coding agents.

What it doesn't do

  • No cron syntax. You pick from once, hourly, daily, weekly and monthly.
  • Not a general automation tool. There are no hundreds of app connectors like in Zapier or n8n. Agents reach other services through the web, MCP servers, GitHub and Slack.
  • Runs while your server is up. A run that was due during downtime fires once when the server is back.

Questions people ask

How do I run an AI agent on a schedule?

Create an agent, save the prompt it should run and pick when it runs, in the console or through the API.

Can I use a cron job or a cron expression?

No. You pick from once, hourly, daily, weekly on chosen days or monthly, in your timezone. These cover most recurring jobs and are easier to read.

What happens if a scheduled run is missed?

Schedules run while your server is up. When it comes back, each missed schedule runs once, so an outage doesn't replay every missed run.

What if the last run is still going when the next one is due?

For a workflow, the new run is skipped, so two copies never run at the same time.

How do I see if a scheduled run failed?

Each schedule shows its next run and how its last one went. Workflows also show which step failed and their success rate over time.

Should scheduled agents use an API key or my own plan?

Use an API key. Personal Claude and ChatGPT plans are meant for individual use, not automated runs.

Run it locally in one command

You need Docker and Python 3.12 or newer. make dev builds the agent image, starts the stack, runs migrations, creates a login and prints the console URL.

Terminal
git clone https://github.com/appssemble/agenhood.git
cd agenhood
make dev