github.com/mattyr/nomad@v0.3.3-0.20160919021406-3485a065154a/website/source/docs/commands/stop.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: stop"
     4  sidebar_current: "docs-commands-stop"
     5  description: >
     6    The stop command is used to stop a running job.
     7  ---
     8  
     9  # Command: stop
    10  
    11  The `stop` command is used to stop a running job and signals the scheduler
    12  to cancel all of the running allocations.
    13  
    14  ## Usage
    15  
    16  ```
    17  nomad stop [options] <job>
    18  ```
    19  
    20  The stop command requires a single argument, specifying the job ID or prefix to
    21  cancel. If there is an exact match based on the provided job ID or prefix, then
    22  the job will be cancelled. Otherwise, a list of matching jobs and information
    23  will be displayed.
    24  
    25  Upon successful deregistration, an interactive monitor session will start to
    26  display log lines as the job unwinds its allocations and completes shutting
    27  down. The monitor will exit once all allocations are stopped and the job has
    28  reached a terminal state. It is safe to exit the monitor early using ctrl+c.
    29  
    30  ## General Options
    31  
    32  <%= general_options_usage %>
    33  
    34  ## Stop Options
    35  
    36  * `-detach`: Return immediately instead of entering monitor mode. After the
    37    deregister command is submitted, a new evaluation ID is printed to the screen,
    38    which can be used to examine the evaluation using the
    39    [eval-status](/docs/commands/eval-status.html) command.
    40  
    41  ## Status Options
    42  
    43  * `-verbose`: Show full information.
    44  
    45  ## Examples
    46  
    47  Stop the job with ID "job1":
    48  
    49  ```
    50  $ nomad stop job1
    51  ==> Monitoring evaluation "43bfe672"
    52      Evaluation status changed: "pending" -> "complete"
    53  ==> Evaluation "43bfe672" finished with status "complete"
    54  ```
    55  
    56  Stop the job with ID "job1" and return immediately:
    57  
    58  ```
    59  $ nomad stop -detach job1
    60  507d26cb
    61  ```