MCP built in · Open source · Self-hostable

Cron jobs your AI agent can set up, watch and fix

Tell your agent what should run and when. It creates the job, reads the run history when one fails, and runs it again. Or do it all from the dashboard.

MIT licensed · Cloudflare Workers or Docker

*/5 * * * *AI agent"run sync every 5 min"MCPPOST /syncmain.pyreport.go#ops-alertsreport.go failed at 03:00
MCP

Your AI agent writes the job, then debugs it

Describe the job to Claude, Cursor or any MCP client. It writes the script, sets the schedule and runs it once to check. When a run fails, it reads the result and fixes the job. A read key lets it look; a write key lets it change things.

  1. 1Create an API keyOn the API & MCP page, read-only or read and write.
  2. 2Add the MCP URL to your client
    claude mcp add --transport http opencron \
      https://opencron.example.com/api/mcp \
      --header "Authorization: Bearer oc_…"
  3. 3Ask"Sync new orders every 5 minutes," or "Why did last night's report fail?"
Claude · CursorAPI keyOpenCronread or write
Why did nightly-report fail last night?
called get_job · list_job_executionsThe last 3 runs exited with code 1: the report query timed out against the database. Before Nov 1 it finished in about 14 seconds.Want me to pause it until the database is back, then run it once?
Why

crontab never tells you it didn't run

Silent failures

A reboot, a rescheduled container, a script that throws. crontab stays quiet, and you find out days later when someone asks why the numbers stopped updating.

No history

When did it last run, how long did it take, what did it print? The logs live on whichever box ran it, and debugging one failure starts with SSH.

Tied to one machine

Serverless and edge apps have no long-running process. Keeping a server alive for a handful of scheduled tasks means one more thing that can go down.

Features

Schedules, run history and alerts in one place

Every job, every run and every alert channel in one dashboard, and the same things over the REST API and MCP.

What happens when a run failsnightly-report · 0 3 * * *
savednotifyMCPfix03:00 runexit 1recordedkept 7 daysalertSlack · Telegramagent reads itlist_job_executionsrerunrun_job · 200 OK

Plain cron, shown in your time

Write any five-field expression or start from a preset, and see the next five runs before you save. Schedules run in UTC; times are shown in your browser's time zone.

*/5 * * * *0 3 * * **/15 8-20 * * 1-5

Every run, on the record

Status, duration and the first 500 characters of the response are kept for 7 days. Run a job by hand at any time, or let your agent do it.

Alerts where your team already is

When a run fails, OpenCron posts to Slack, Discord, Telegram, Lark, DingTalk or any webhook. Failures within a minute of each other are sent once.

SlackDiscordTelegramLarkDingTalkWebhook

Secrets stay secret

Secrets are stored encrypted and reach scripts as environment variables. Agents can list their names and set new values, but never read one back.

Scripts

No endpoint? Write the script

Not every job is an API call. Write a script and OpenCron runs it on your schedule, isolated from everything else.

  • →On Cloudflare: JavaScript in its own Worker, with a key-value store and a database for each job
  • →With Docker: Node.js, Python or Go, each run in a fresh container
  • →Secrets arrive as environment variables: env.NAME, os.environ, os.Getenv
  • →Add a sandbox to a Cloudflare deployment to run Python and Go there too
main.jsJavaScript
// Count the runs of this job in its own KV store
export default {
  async fetch(request, env) {
    const { jobName, scheduledAt } = await request.json();
    const runs = Number((await env.KV.get("runs")) ?? 0) + 1;
    await env.KV.put("runs", String(runs));
    return new Response(`${jobName}: run ${runs} at ${scheduledAt}`);
  },
};
$ run now · 38ms
nightly-report: run 42 at 2026-11-07T03:00:00.000Z
← 200 OK
Compare

Versus keeping crontab alive yourself

Server crontabCloud schedulersOpenCron
Managed by your AI agent over MCPNoNoYes
Alerts when a job failsBuild it yourselfSeparate monitoringBuilt in
Status, output and duration per runGrep the serverSpread across consolesBuilt in
Run your own scriptsYesDeploy a function firstYes
No server to keep aliveNoYesYes
Open source, self-hostableYesNoYes
Open source

Run it on your Cloudflare account or your own server

OpenCron is MIT licensed. Deploy it to Cloudflare Workers with D1, or run it anywhere with Docker and Postgres. Your jobs and their history stay in your own database.

# clone and start
git clone https://github.com/becoolme/opencron
cd opencron && cp .env.docker.example .env
# replace every change-me value in .env
docker compose up -d --build

# open http://localhost:8080 and create the first account

Don't wait for someone to tell you the job stopped three days ago

Create a job in a minute, or ask your agent to.