man oscar The manual Automation

Scheduled jobs

Scheduled jobs: schedules, time zone, where results go, approvals for unattended runs, missed runs, limits.

MANUAL / AUTOMATION 18 / 29

A scheduled job is a prompt Oscar runs on its own, on a schedule, as an agent turn with its tools — "every weekday at 8:30, summarise my calendar", "in 20 minutes, remind me to call Anna", "every 2 hours, check that the backup ran". Its answer goes to one or more chats, or is only stored. A job can also run a shell command instead of the model (a script job), or run a command first that decides whether the model is needed at all (a check).

Jobs run inside oscar gateway serve (the chat gateway process). oscar matrix serve, oscar telegram serve and oscar discord serve do not run them. Without a chat platform configured, oscar gateway serve (and its service, oscar gateway install --start) says so and runs the scheduled jobs only, so jobs made in a terminal run too; their results are stored (oscar cron runs) or go where --deliver says. oscar cron run <job> --here runs a job once in the terminal.

Making a job

  • In a chat, ask for it in plain words. Oscar uses the cronjob tool, which asks you first (it shows the prompt, the schedule, where results go, and any script or check command in full). The job reports back into that chat.
  • In the terminal chats, the same; results are stored unless you name a chat.
  • From a shell: oscar cron add "<schedule>" "<prompt>" (see below).
  • From a blueprint: a ready-made job you fill in by answering a few questions (below).

Each run starts a fresh conversation that knows nothing of the chat it was made in, so the prompt must say everything: what to look at, where, and what to report. To carry something from one run to the next, or from another job, use context_from (below).

Blueprints

A blueprint is a ready-made job: you answer its questions, Oscar shows the job it makes, and nothing is scheduled until you confirm. /blueprint in the terminal chats, blueprint (with the chat's prefix: !blueprint, /blueprint on Telegram) in chat gateways.

Blueprint What it does Questions (defaults)
daily-digest the day's news on your topics, five to eight points with sources topics, time (08:00), days (every day)
inbox-triage sorts unread mail into reply today / can wait / the rest; never replies, archives or deletes source (the tool or MCP server with your mail), time (09:00), days (weekdays)
price-watch checks a product page; says PRICE ALERT when your condition is met, quiet otherwise url, target (the price drops), every (6h)
news-monitor new results about a subject since the last check; quiet when there is nothing query, every (3h)
repo-check runs your build or tests, shows uncommitted changes and new TODOs; quiet when all is well path (.), check (make test), time (08:30), days (weekdays)
custom your own prompt on a schedule prompt, schedule (every day at 09:00)
text
/blueprint                                  # the catalogue
/blueprint daily-digest                     # its questions
/blueprint daily-digest topics="AI, Rust" time=07:30 days=weekdays
/blueprint confirm                          # or: /blueprint cancel

Answers are key=value (quote values with spaces) or key: value, separated by ; or new lines. Every blueprint also takes deliver (as --deliver above: here, a platform, platform:chat, none); a job made in a chat reports to that chat, one made in a terminal is stored. The job is checked like any other (the schedule, cron_min_interval, cron_max_jobs), shown with its name, schedule and next run, where results go, its tools and its prompt, and waits 15 minutes for confirm from the same person in the same chat or terminal session. It then runs unattended like every job: what needs approval follows unattended_approve (see below), so repo-check runs its command only when that allows it.

Suggestions

/suggestions (terminal chats) proposes blueprints from your recent sessions: requests you made on three or more different days, and requests that sound like a routine (news about a subject, a price you checked, your inbox, regular test runs). It is off until you turn it on (oscar config set automation_suggestions on). It reads the last 30 days of sessions in this machine's store with plain rules: no model is asked, nothing is sent anywhere, and nothing is created; each suggestion is a /blueprint … line that shows the job first.

Schedules

Local times are in your time zone (below), or the job's own. Case does not matter.

Kind Examples
Days and a time every day at 9am, weekdays at 8:30, every monday 9am, mon, wed and fri at 14:00, daily at 7, weekends at noon
Interval every 30m, 30m, every 2 hours, 2h, every hour, every 1h30m
Once in 20 minutes, in 2h, at 18:30 (today, or tomorrow if that has passed), tomorrow at 9am, today 17:00, 2026-12-01 09:00, 2026-12-01T09:00+01:00
Cron expression 0 9 * * 1-5, */15 9-17 * * mon-fri, @daily, @hourly, @weekly, @monthly, @yearly
  • A cron expression has five fields: minute, hour, day of month, month, day of week (0 or 7 = Sunday; month and day names work). When both the day of the month and the day of the week are set, either one matching is enough.
  • An interval counts from the first run (every 30m made at 10:07 runs at 10:37, 11:07, …).
  • A bare duration repeats: 30m is the same as every 30m; to run once, say in 30m. every day without a time is refused: add at 9am, or use every 24h.
  • The shortest gap between two runs is one minute by default (cron_min_interval).
  • A one-time job may be at most 2 minutes in the past (it then runs at once).
  • Daylight saving: a time that does not exist on the day the clocks go forward (02:30) runs at the first minute after the gap; a time that happens twice when they go back runs once, the first time.

Time zone

timezone in config.toml (or OSCAR_TIMEZONE): an IANA name such as Europe/Berlin, America/New_York or UTC. Without it, the system's zone is used. A job can have its own (timezone on the job, --timezone): its local times are read there, whatever the global zone. The zone database is built into Oscar, so this works on machines without /usr/share/zoneinfo. oscar cron list and oscar doctor show the zone in use.

What a job runs with

Every job has a prompt and a schedule. Each of these is optional and, when unset, follows the global setting:

Setting (tool parameter / oscar cron flag) Meaning
skills / --skills a,b skills loaded in full into each run's prompt (they must exist)
model / --model the model the runs use: model, or provider:model for another provider (default: cron_model, else the main model)
reasoning / --reasoning none, low, medium, high or xhigh
workdir / --workdir the folder the runs work in: inside the workspace (in host sandbox mode anywhere but Oscar's own data); the jail and file tools see only that folder
timezone / --timezone the zone the schedule is read in
grace_minutes / --grace with catch-up off: how late a missed run may still start (0-1440)
toolsets / --toolsets which tools the runs get, as for tools (web,files, -bash, mcp_github_*)
wrap / --wrap on|off|inherit the header and footer around delivered results (default cron_wrap, on)
context_from / --context-from a job (id or name) whose last good result is put before this job's prompt; self for the job's own previous result
check / --check a shell command run before the model (below)
script / --script a shell command run instead of the model (below)

The prompt is checked (at most 8,000 characters, no invisible or control characters); so are the model (no spaces), the zone (a real IANA name), the skills and the folder. A setting cleared with oscar cron edit --clear model (or null in the tool) goes back to the global one.

Check commands

A check is a shell command that runs first, through the same approval gate as the model's shell commands (below), and decides whether the model is woken:

  • exit 0: the model runs, and what the check printed goes into its prompt ("What the job's check printed"). When the last line printed is JSON: {"wake": false} (or {"wakeAgent": false}) skips the run quietly instead, and {"wake": true, "context": "…"} gives only that context.
  • exit 1: nothing to do — the run is recorded as skipped and nothing is sent (handy for grep -q, test -f, curl --fail).
  • any other exit status, or a refused command: the run fails, with the check's output.

A check like curl -s https://status.example.com | grep -q DEGRADED turns an hourly job into "tell me only when something is wrong" without a model call when all is well.

Script jobs

A job with script runs that command instead of the model: no tokens, no provider. Its output (trimmed, secrets redacted) is the result and is delivered as any job's; empty output sends nothing; a non-zero exit status is a failure with the output. Its prompt may be left out (oscar cron add 30m --script "df -h /"). The script runs in the job's folder, in the same jail as the model's commands, within cron_timeout.

Scripts and checks are commands that run with nobody watching, so the unattended rules apply exactly as to a run's own commands: what needs approval runs only when unattended_approve is auto (with an audit line) or the smart reviewer approves it; otherwise it is refused and the run says so. Dangerous commands are always refused. The approval prompt for creating or changing a job shows both commands in full.

One job's result in another

context_from: "j3f9a2c" puts the last good result of job j3f9a2c (cut to 8,000 characters, its start and end kept) before the prompt, as "The last result of job …". self gives a job its own previous result, so a daily job can say what changed since yesterday. Silent results are skipped.

Where results go

deliver (the tool's parameter, --deliver on the command line), one or several separated by commas:

Value Goes to
origin the chat the job was made in (the default for jobs made in a chat)
none nowhere: the result is stored (the default for jobs made in a terminal)
telegram, matrix, discord that platform's home channel (sethome, or telegram_home_channel etc. in config.toml)
telegram:<chat id>, matrix:<room id>, discord:<channel id> that chat
all every platform's home channel, worked out when the result is ready

For example deliver: "origin,discord" or --deliver telegram,matrix. A chat named twice (directly and through all) gets the result once.

Only chats Oscar may post to can be named — never an arbitrary recipient:

  • a chat where a user who is on the platform's allowed list now has talked to Oscar (the gateway remembers these as they happen);
  • the platform's home channel, if you set one;
  • on Telegram, an allowed user's private chat (its id is the user's id).

The chat gets:

text
⏰ Morning summary (job j3f9a2c)

<the answer>

— !cron lists this chat's jobs; !cron remove j3f9a2c stops this one. Reply to
this message to talk about it.
  • With wrap off (per job, or cron_wrap = off for all) only the answer is sent, without the header and the footer.
  • A failed run says ⚠️ … failed with the error; a run stopped by the time limit says so.
  • A run that started late says how late, and how many times the job was due meanwhile.
  • Files the run made (send_file, speech) are sent with it.
  • If there is nothing worth reporting, a run can answer [SILENT] and nothing is sent (useful for "tell me only if something changed" jobs).
  • A run that decides the job failed (the thing it checks is broken, or it could not do the work) starts its answer with [CRON_FAILURE] on its own line, then says why. It is then recorded and reported as a failure.
  • While a platform is not running (restarting, network down), the result waits and is sent when it is back, for up to a day; then it is given up. With several chats, only those not reached yet are tried again. A chat that is no longer allowed is not sent to.
  • Every run is kept (the last 50 per job): oscar cron runs, /cron runs.

Replying to a result

Reply to a delivered result in the chat (the platform's reply feature) and the reply goes into that chat's conversation with the result quoted before it, so "why is the disk so full?" in answer to the disk report continues right there. Results are remembered for this for 30 days.

What a run can do

A run is an agent turn with Oscar's tools in a conversation of its own (cron-<job id>-<time>, searchable with session_search, readable with oscar chat --session <id>). Nobody is watching it, so:

  • Approvals: unattended_approve decides (unset: never, or auto when approve = "auto"). With auto, calls that need approval and are not dangerous run and are written to the audit log, as in an attended auto session; with smart, those the reviewer model approves run. Otherwise they are refused at once (nothing waits for an answer) and listed at the end of the result ("Not done — these need approval and nobody was there to give it"). Allow and deny rules apply as everywhere. Dangerous commands are always refused in a run, in every mode (see approvals and sandbox). The tools of an MCP server marked untrusted that may change something are refused too (they always need a person).
  • No clarify (nobody can answer), no cronjob (jobs do not make jobs) and no send_message (a job reports to its own chats; it does not message others).
  • It has the kanban board, send_file, the browser (when one is set up), memory and skills like any conversation — or only the tools its toolsets allow.
  • It stops after cron_timeout (default 10 minutes); the background processes it started are stopped with it.

Reliability

  • The configuration first. Before each run Oscar checks that the job can run: its model's provider is set up (key or sign-in), its skills exist, its folder is there and within reach. If not, the run is recorded as blocked_config with what is missing, no model is called, and the chat is told once; later runs that cannot start either are stored, not sent, until one works.
  • An unreachable provider is tried again. When a run fails because the model's provider could not be reached (network down, time-out, overloaded, a server error), the job runs again 5, 15 and 30 minutes later; those failures are stored, not sent. Only when the last try fails too is the failure reported. Other failures are not retried. The job's own schedule goes on meanwhile. cron_retry_unreachable = off turns this off.
  • Failures are reported once. The first failure of a job is sent (saying that further ones will not be); failures after it in a row are stored (muted), and the next run that works says "It works again after N failed runs". oscar cron status lists what is failing.
  • Delivery failures are their own thing. A run that worked but reached no chat leaves the job delivery_failed; it does not count as a failure of the job.
  • Cancelling. oscar cron cancel <job>, !cron cancel <job> or /cron cancel <job> stops a run in flight within a couple of seconds (also from another process than the gateway); it is recorded as cancelled and not sent.

When Oscar was not running

A job never runs more than once for missed time:

  • When the gateway starts again (or the scheduler gets to it late), a job that came due meanwhile runs once, however many times it was due; the result says how late it is and how many times it was missed.
  • With catch_up off (--no-catch-up, or catch_up: false in the tool), a run later than its grace window is skipped instead and recorded as missed; the job continues at its next time. The grace window is the job's grace_minutes when set, else half its period, between 2 minutes and 2 hours (2 minutes for a one-time job).
  • Starting a run moves the job to its next time in the same database transaction, so a crash during a run never repeats it: the run is recorded as interrupted and the chat is told.
  • A job paused and resumed continues from the time it is resumed; the runs it missed while paused are not run.

Managing jobs

In a chat (! on Matrix and Discord, / on Telegram):

Command Does
cron the jobs made in this chat or reporting to it
cron status the scheduler, the next runs, and what is failing (this chat's jobs)
cron run <id> run it now
cron pause <id> / cron resume <id> pause / resume it
cron cancel <id> stop its run in flight
cron remove <id> remove it

cron status and cron cancel act at once, even while Oscar is busy in that chat; the others take their turn. Only this chat's jobs can be changed from it; the person typing is on the allowed list, so these do not ask. In the terminal chats, /cron, /cron status, /cron run|pause|resume|cancel|remove <id>, /cron pause-all, /cron resume-all and /cron runs [<id>] work on every job.

From a shell, see cli reference: oscar cron list | add | edit | show | remove | pause | resume | pause-all | resume-all | run [--here] | cancel | runs | status. oscar cron run <id> makes the job due now (the gateway runs it at its next check, within 30 seconds); --here runs it in the terminal instead, unattended exactly as the gateway would, and prints the result (not delivered). oscar cron edit <id> changes only what is given: --schedule, --prompt, --name, --deliver, --repeat / --no-repeat, --catch-up on|off, any job setting above, and --clear model,workdir,… to put settings back to their defaults.

oscar cron status shows whether the scheduler runs (its last check), the jobs, those running (and whether a cancel was asked for), the next five runs, planned re-runs, and every job that is failing, blocked or could not deliver.

Through the model, the cronjob tool: create, list, update, pause, resume, remove, run, with the settings above as parameters. A job is named by its id (j3f9a2c) or its exact name. Everything except list asks for approval (in auto mode it runs with an audit line, as any call that asks); "allow for this session" covers further cronjob calls in that conversation.

Limits and settings

Config key (variable) Default Meaning
timezone (OSCAR_TIMEZONE) the system's the zone local times are in
cron (OSCAR_CRON) on off: the gateway does not run jobs
cron_model (OSCAR_CRON_MODEL) the main model the model jobs run on unless they name their own (model or provider:model)
cron_wrap (OSCAR_CRON_WRAP) on the header and footer around delivered results
cron_retry_unreachable (OSCAR_CRON_RETRY_UNREACHABLE) on run again after 5, 15 and 30 minutes when the provider was unreachable
cron_max_jobs (OSCAR_CRON_MAX_JOBS) 50 jobs that may exist (1-1000)
cron_min_interval (OSCAR_CRON_MIN_INTERVAL) 1m shortest gap between two runs of a job (1 minute to 1 day); cron expressions are checked over their coming runs
cron_timeout (OSCAR_CRON_TIMEOUT) 10m a run (or a script, or a check) that takes longer is stopped (1 minute to 6 hours)
cron_parallel (OSCAR_CRON_PARALLEL) 1 runs at the same time (1-4); others wait their turn
telegram_home_channel, matrix_home_channel, discord_home_channel none where deliver: telegram (etc.) goes

Durations are written 90s, 10m, 2h; a bare number means minutes. A value out of range is reported in the log and the default is used. The scheduler checks every 30 seconds, or earlier when the next job (or re-run) is due; a job made or run from a chat starts at once.

A job's prompt is at most 8,000 characters, a script or check at most 4,000, and none may contain invisible or control characters (they could hide text from the person approving it).