Skip to main content

Run a Command

sandbox.exec(...) to run a command in the sandbox.
You can also pass request-scoped options on the same call:

Start a Background Process

Use sandbox.processes.start(...) when you need to keep a process running:

Get, List, and Signal Processes

Inspect running processes or control them later by ID:
result() is a convenience alias for wait() on a process handle.

Stream Process Output

Stream stdout and stderr as server-sent events:

Common Parameters

string
required
Command to run inside the sandbox.
string
Working directory for the process.
object
Environment variables to inject into the process.
number
Maximum runtime in milliseconds.
string
Run the command as a specific sandbox user, for example root.

Process Status Values

  • queued
  • running
  • exited
  • failed
  • killed
  • timed_out