Cohub
中文Start a Space

Set up AI agent scheduled tasks that run inside your Cohub Space while you are away

You schedule AI agent tasks in Cohub with a scheduled prompt: a message the Space sends to its agent once at a set time or on a cron schedule, with every run kept as a Chat.

Who
Someone with a recurring chore a capable assistant could do: a morning summary, a weekly check, a report that needs regenerating.
When
You notice you have typed the same request to an AI three Mondays in a row.
Why
A scheduled prompt in Cohub runs the agent inside the Space that already holds the files, skills and sandbox, so the work happens where its results belong.
Terminal: cohub spaces prompt --help lists --reply, which sends the final reply back to the calling Chat and runs its Agent, next to --harness, --approval-mode, --cron and the other prompt options
Terminal output of cohub cron-jobs --help: list, get, update, delete, toggle and runs
Source: www.npmjs.com/package/@neta-art/cohub-cli
A Chat in a Cohub Space, dark theme: tool cards for running a script in the sandbox and writing notes/october-summary.md, then the answer with the script as a code block

When a routine task should run on a clock without anyone at the keyboard—a weekday morning brief, a weekly audit, or a monthly site rebuild—attach a scheduled prompt to the Space that already holds the files, skills, and sandbox. Cohub fires the prompt at the time you choose, and the same agent you normally chat with finishes the work inside that Space.

Pick the time shape first

Before writing the command, decide which kind of clock fits the job:

Time shape Flag Use it when
Relative delay --delay-ms <ms> A one-off follow-up should run after a fixed wait from now
Fixed timestamp --at "<ISO-8601>" A single run belongs at a specific date and clock time
Recurring cadence --cron "<5-field>" --timezone <IANA> The same check or summary repeats on a calendar schedule

Recurring jobs run the same agent with the same Space tools, so routine work collapses into a single prompt: summarizing new entries from notes/inbox.md into notes/today.md at 08:30 on weekdays, running a test suite and dependency audit every Monday into reports/weekly.md, or rebuilding site/ from data/ on the 1st of each month and publishing a new version of the report App. For a complete walkthrough from prompt to real output, see a daily GitHub issues digest.

One prompt, three time shapes

All three schedules go through cohub spaces prompt against your target Space:

# recurring: 5-field cron with an IANA time zone
cohub -s <space> spaces prompt --cron "30 8 * * 1-5" --timezone Asia/Shanghai \
  --title "Morning inbox" "Read notes/inbox.md and write today's summary to notes/today.md"

# once, at a set time
cohub -s <space> spaces prompt --at "2026-12-01T09:00:00+08:00" "Draft the December changelog"

# once, after a relative delay
cohub -s <space> spaces prompt --delay-ms <ms> "Check whether the export finished"

Add --session <id> if every run should append to one ongoing Chat instead of opening a fresh thread each time, and pass --env KEY=value for per-run environment variables. Because cohub is also available inside the Space's sandbox, you can ask the agent in a regular Chat to register the schedule for you.

What a run leaves in the Space

Each scheduled firing executes in the Space's sandbox with access to /workspace files, Space skills, media generation, and App publishing. Rather than vanishing into a silent background log, every run leaves behind concrete artifacts:

  • A Chat transcript. Each run lands as a Chat (or a new turn in --session <id>) filed under a scheduled-task source label so automated runs stay separate from manual conversations.
  • Updated workspace files or Apps. Files written under /workspace persist across sandbox idle stops, and any published App version stays live at its URL.

When a schedule is the wrong tool

A scheduled prompt watches the clock only—it does not listen for workspace events. If work should start right after something happens (a file changes, a turn finishes, a Save is created, an App is published, or a webhook arrives), use a Space hook instead of polling on a tight cron. Full option details for clock-driven schedules live in Scheduled prompts.

Checking that a run happened

Verify schedules and inspect recent executions either from the terminal or in the web app:

cohub cron-jobs ls --filter attention   # schedules that need a look
cohub cron-jobs runs <id>               # run history
cohub cron-jobs toggle <id> off         # pause
cohub cron-jobs update <id> --cron "0 9 * * 1"

In the browser, open Library to see scheduled prompts across all of your Spaces together with their last and next run timestamps, then open the scheduled-task Chat to review the exact tool calls and output.

Reference in the docs

This page: Which routine jobs to hand to a scheduled agent run, and when an event hook fits better.

  • Core concepts: what a scheduled prompt is
  • CLI: the spaces prompt command and its options

FAQ

How often can a schedule run?

A schedule takes a standard 5-field cron expression with a time zone. Each run is metered like any other agent turn, so frequent runs cost more.

Do I need to keep my computer on?

Not for a Space on a cloud sandbox. Cohub sends the prompt on schedule and the agent works in that sandbox.

Sources

Published · Updated