box.schedule and ephemeralBox.schedule.
API
Schedule a shell command
Run a shell command on a cron schedule.| Parameter | Required | Description |
|---|---|---|
cron | Yes | 5-field cron expression (UTC) |
command | Yes | string[] — the command to run |
webhookUrl | No | URL to notify when the scheduled run completes |
webhookHeaders | No | Headers to include in the webhook request |
folder | No | Working directory. Defaults to box.cwd; relative paths resolved against it |
Schedule an agent prompt
Run an agent prompt on a cron schedule. Requires an agent to be configured on the box.| Parameter | Required | Description |
|---|---|---|
cron | Yes | 5-field cron expression (UTC) |
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 |
webhookUrl | No | URL to notify when the scheduled run completes |
webhookHeaders | No | Headers to include in the webhook request |
List schedules
Retrieve all non-deleted schedules for the current box.Get a schedule
Retrieve a single schedule by ID.Pause a schedule
Pause an active schedule so it stops running.Resume a schedule
Resume a paused schedule.Delete a schedule
Remove a schedule so it no longer runs.Schedule response
Most schedule methods return aSchedule object:
Cron syntax
Schedules use standard 5-field cron expressions (UTC):| Expression | Description |
|---|---|
* * * * * | Every minute |
0 * * * * | Every hour |
0 9 * * * | Daily at 9:00 AM |
0 9 * * 1-5 | Weekdays at 9:00 AM |
*/5 * * * * | Every 5 minutes |