From db746e00e3a010c65c14df2cc95bedbb63c996f8 Mon Sep 17 00:00:00 2001 From: enesakar Date: Fri, 3 Apr 2026 00:01:00 -0400 Subject: [PATCH] docs: add timeout and agent options to box schedule docs Co-Authored-By: Claude Opus 4.6 (1M context) --- box/overall/schedules.mdx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/box/overall/schedules.mdx b/box/overall/schedules.mdx index c21db612..4ea0b3d8 100644 --- a/box/overall/schedules.mdx +++ b/box/overall/schedules.mdx @@ -42,7 +42,9 @@ Run an agent prompt on a cron schedule. Requires an agent to be configured on th const schedule = await box.schedule.agent({ cron: "0 9 * * *", prompt: "Run the test suite and fix any failures", - model: "claude-sonnet-4-6", // optional, overrides box's model + model: "claude-sonnet-4-6", // optional, overrides box's model + timeout: 300_000, // optional, kill the run after 5 minutes + options: { maxBudgetUsd: 1.0 }, // optional, provider-specific agent options }) console.log(schedule.id) @@ -54,6 +56,8 @@ console.log(schedule.id) | `prompt` | Yes | The prompt to send to the agent | | `folder` | No | Working directory. Defaults to `box.cwd`; relative paths resolved against it | | `model` | No | Override the box's default model for this schedule | +| `options` | No | Provider-specific agent options (e.g. `maxBudgetUsd`, `effort`, `systemPrompt`, `maxTurns`) | +| `timeout` | No | Timeout in milliseconds — kills the run if exceeded | | `webhookUrl` | No | URL to notify when the scheduled run completes | | `webhookHeaders` | No | Headers to include in the webhook request | @@ -131,6 +135,8 @@ interface Schedule { prompt?: string // present when type is "prompt" folder?: string model?: string + agent_options?: Record + timeout?: number status: "active" | "paused" | "deleted" webhook_url?: string webhook_headers?: Record @@ -209,6 +215,8 @@ await box.git.clone({ repo: "github.com/your-org/your-repo" }) await box.schedule.agent({ cron: "0 9 * * 1-5", prompt: "Pull latest changes, review the last 24h of commits, and open issues for any bugs or style violations", + timeout: 600_000, + options: { maxBudgetUsd: 2.0, effort: "high" }, }) ```