Skip to content

CapsuleProcessRunCommandRequest

Runs a shell command in a capsule run that has not ended; one sent while it is still starting runs once it is ready. The response is the queued command: read it back by its id (or wait for it with the SDKs’ execAndWait) to see its result.

Kind: an object, used in requests.

FieldTypeRequiredDescription
commandstringyesThe command: shell text run by the user’s login shell, from / — usually a program name, but it may be a whole command line (pipes, redirects and variables are then the shell’s). Constraints: required (empty or whitespace-only strings are rejected).
argumentsstring[]The command’s arguments. Each is passed as one literal word, quoted for the shell as needed, so spaces, quotes, $, globs and operators in an argument reach the program exactly as given. To pipe or redirect, run sh with arguments ["-c", "<line>"], or put the line in command.
runAsUserstring | nullThe user to run it as: one of the capsule’s users or one added to the run. Null: the default user.
maximumDurationtimespan | nullThe longest the command may run before it is stopped. Null: five minutes.
asyncbooleanRun the command in the background: the capsule moves on to the next command without waiting for this one, and records its result when it ends.
{
"command": "...",
"arguments": [
"..."
],
"runAsUser": "...",
"maximumDuration": "00:05:00",
"async": false
}