Octop Cron API: Schedule Automated Agent Tasks via REST
The Cron API lets you create scheduled tasks that prompt your agents automatically — no manual interaction required. Jobs run on cron expressions, fixed intervals, or a specific one-time date and time. Each job sends a prompt to the agent on schedule, either passing it directly to the session or running it through the LLM to generate a reply.
Base path
Endpoints
Create a cron job
Send a POST request with a trigger and a prompt to schedule a recurring task. Only the job owner can list or change jobs — administrators who do not own the agent receive an empty list.
Request body
Optional display label. When omitted, the server derives one from prompt.
Defines when the job runs. Accepts a cron expression, an interval shorthand, or a one-time ISO 8601 date. See the trigger format table below.
The text sent to the agent when the job fires. Must be non-empty and no longer than 2000 characters.
Controls how the prompt is handled. Use "agent" (default) to run the prompt through the LLM and push the reply into the session. Use "text" to push the prompt text directly without an LLM call.
Route the scheduled message to a specific existing thread. If omitted, the job uses the agent's default session.
When true, Octop creates a brand-new thread for each run instead of appending to an existing one. Useful for daily summaries you want to keep isolated.
Override the agent's default_model for this job only — for example "openai:gpt-4o-mini" to use a cheaper model for routine scheduled prompts.
Trigger formats
Cron jobs run in the timezone configured on your Octop server. Check the current timezone with GET /api/cron/settings before scheduling time-sensitive jobs.
Trigger a job immediately
Use POST /agents/{aid}/cron/{cid}/run-now to fire a scheduled job outside its normal schedule — for example when testing a new prompt before the next scheduled run.
This returns 204 No Content and enqueues the job immediately. It does not affect the next scheduled run time.
Combine fresh_thread: true with a daily cron expression to get a clean, date-stamped conversation thread for every briefing or report — making it easy to review past runs in the chat history without scrolling through a single long thread.

