`heroku run` ============ run a one-off process inside a Heroku dyno * [`heroku run`](#heroku-run) * [`heroku run:detached`](#heroku-rundetached) * [`heroku run:inside DYNO_NAME COMMAND`](#heroku-runinside-dyno_name-command) ## `heroku run` run a one-off process inside a heroku dyno ``` USAGE $ heroku run -a [--prompt] [-e ] [-x] [--no-launcher] [--no-notify] [--no-tty] [-r ] [-s ] [--type ] FLAGS -a, --app= (required) [env: HEROKU_APP] parent app used by review apps -e, --env= environment variables to set (use ';' to split multiple vars) -r, --remote= git remote of app to use -s, --size= dyno size -x, --exit-code passthrough the exit code of the remote command --no-launcher don't prepend 'launcher' before a command --no-notify disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0) --no-tty force the command to not run in a tty --type= process type GLOBAL FLAGS --prompt interactively prompt for command arguments and flags DESCRIPTION run a one-off process inside a heroku dyno Shows a notification if the dyno takes more than 20 seconds to start. Heroku automatically prepends 'launcher' to the command on CNB apps (use --no-launcher to disable). EXAMPLES $ heroku run bash $ heroku run -s standard-2x -- myscript.sh -a arg1 -s arg2 ``` _See code: [src/commands/run/index.ts](https://github.com/heroku/cli/blob/v11.10.0/src/commands/run/index.ts)_ ## `heroku run:detached` run a detached dyno, where output is sent to your logs ``` USAGE $ heroku run:detached -a [--prompt] [-e ] [--no-launcher] [-r ] [-s ] [-t] [--type ] FLAGS -a, --app= (required) [env: HEROKU_APP] app to run command against -e, --env= environment variables to set (use ';' to split multiple vars) -r, --remote= git remote of app to use -s, --size= dyno size -t, --tail continually stream logs --no-launcher don't prepend 'launcher' before a command --type= process type GLOBAL FLAGS --prompt interactively prompt for command arguments and flags DESCRIPTION run a detached dyno, where output is sent to your logs EXAMPLES $ heroku run:detached ls ``` _See code: [src/commands/run/detached.ts](https://github.com/heroku/cli/blob/v11.10.0/src/commands/run/detached.ts)_ ## `heroku run:inside DYNO_NAME COMMAND` run a command inside an existing dyno (for Fir-generation apps only) ``` USAGE $ heroku run:inside DYNO_NAME... COMMAND... -a [--prompt] [-x] [--no-launcher] [-r ] ARGUMENTS DYNO_NAME... name of the dyno to run command inside COMMAND... command to run (Heroku automatically prepends 'launcher' to the command) FLAGS -a, --app= (required) [env: HEROKU_APP] app to run command against -r, --remote= git remote of app to use -x, --exit-code passthrough the exit code of the remote command --no-launcher don't prepend 'launcher' before a command GLOBAL FLAGS --prompt interactively prompt for command arguments and flags DESCRIPTION run a command inside an existing dyno (for Fir-generation apps only) EXAMPLES # Run bash $ heroku run:inside web-848cd4f64d-pvpr2 bash -a my-app # Run a command supplied by a script taking option flags $ heroku run:inside web-848cd4f64d-pvpr2 -a my-app -- myscript.sh -x --log-level=warn # Run a command declared for the worker process type in a Procfile $ heroku run:inside web-848cd4f64d-pvpr2 worker -a my-app ``` _See code: [src/commands/run/inside.ts](https://github.com/heroku/cli/blob/v11.10.0/src/commands/run/inside.ts)_