UNPKG

2.85 kBMarkdownView Raw
1heroku-run [![Circle CI](https://circleci.com/gh/heroku/heroku-run.svg?style=svg)](https://circleci.com/gh/heroku/heroku-run)
2==========
3
4[![codecov](https://codecov.io/gh/heroku/heroku-run/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-run)
5[![License](https://img.shields.io/github/license/heroku/heroku-run.svg)](https://github.com/heroku/heroku-run/blob/master/LICENSE)
6
7Heroku CLI plugin to run one-off dyno processes.
8
9<!-- commands -->
10* [`heroku logs`](#heroku-logs)
11* [`heroku run`](#heroku-run)
12* [`heroku run:detached`](#heroku-rundetached)
13
14## `heroku logs`
15
16display recent log output
17
18```
19USAGE
20 $ heroku logs
21
22OPTIONS
23 -a, --app=app (required) app to run command against
24 -d, --dyno=dyno only show output from this dyno type (such as "web" or "worker")
25 -n, --num=num number of lines to display
26 -r, --remote=remote git remote of app to use
27 -s, --source=source only show output from this source (such as "app" or "heroku")
28 -t, --tail continually stream logs
29 --force-colors force use of colors (even on non-tty output)
30
31DESCRIPTION
32 disable colors with --no-color, HEROKU_LOGS_COLOR=0, or HEROKU_COLOR=0
33
34
35EXAMPLES
36 $ heroku logs
37 2012-01-01T12:00:00+00:00 heroku[api]: Config add EXAMPLE by email@example.com
38 2012-01-01T12:00:01+00:00 heroku[api]: Release v1 created by email@example.com
39```
40
41## `heroku run`
42
43run a one-off process inside a heroku dyno
44
45```
46USAGE
47 $ heroku run
48
49OPTIONS
50 -a, --app=app (required) app to run command against
51 -e, --env=env environment variables to set (use ';' to split multiple vars)
52 -r, --remote=remote git remote of app to use
53 -s, --size=size dyno size
54 -x, --exit-code passthrough the exit code of the remote command
55 --no-notify disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0)
56 --no-tty force the command to not run in a tty
57 --type=type process type
58
59DESCRIPTION
60 Shows a notification if the dyno takes more than 20 seconds to start.
61
62EXAMPLES
63 $ heroku run bash
64 Running bash on app.... up, run.1
65 ~ $
66
67 $ heroku run -s hobby -- myscript.sh -a arg1 -s arg2
68 Running myscript.sh -a arg1 -s arg2 on app.... up, run.1
69```
70
71## `heroku run:detached`
72
73run a detached dyno, where output is sent to your logs
74
75```
76USAGE
77 $ heroku run:detached
78
79OPTIONS
80 -a, --app=app (required) app to run command against
81 -e, --env=env environment variables to set (use ';' to split multiple vars)
82 -r, --remote=remote git remote of app to use
83 -s, --size=size dyno size
84 -t, --tail stream logs from the dyno
85 --type=type process type
86
87EXAMPLES
88 $ heroku run:detached ls
89 Running ls on app [detached]... up, run.1
90 Run heroku logs -a app -p run.1 to view the output.
91```
92<!-- commandsstop -->