Skip to content

CLI reference

ry job

Markdown

Run one command in an app's image on a throwaway machine, and get its result.

ry job [options] [command]

Run a command in the app’s deployed image, stream its output, exit with its exit code (the command goes after –).

ry job run [options] <app> <command...>

Options:

  • -e, --env <KEY=VALUE>: Env for this job only, laid over the app’s secrets (repeatable).
  • -t, --timeout <seconds>: Stop the job after this many seconds (default 900, at most 3600).
  • -m, --memory <mb>: Memory of the job’s machine in MB (default: the app’s).
  • -c, --vcpus <n>: vCPUs of the job’s machine (default: the app’s).

Example:

ry job run web -- npm run migrate
ry job run web --memory 4096 --timeout 1800 -- node scripts/report.js

From ry job run --help:

Example:
ry job run shop --memory 4096 -- npm run migrate
Everything after -- is the command, passed on argument by argument. The job keeps running if
this command is interrupted; ry job cancel <id> stops it.

The app’s jobs, newest first (20 per page).

ry job list [options] <app>

Options:

  • -n, --limit <n>: How many (at most 20).
  • --before <createdAt>: Only jobs created before this - the createdAt of the last job of the previous page.

Example:

ry job list web

One job: state, exit code, timing and its recorded output.

ry job get [options] <id>

Example:

ry job get job-1a2b3c4d

Abort a job that is queued or running (its machine is destroyed, the record stays).

ry job cancel [options] <id>

Options:

  • -y, --yes: Confirm without asking (automation, and the way back after consent).

Example:

ry job cancel job-1a2b3c4d --yes