github.com/smintz/nomad@v0.8.3/website/source/docs/commands/job/stop.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: job stop"
     4  sidebar_current: "docs-commands-job-stop"
     5  description: >
     6    The job stop command is used to stop a running job.
     7  ---
     8  
     9  # Command: job stop
    10  **Alias: `nomad stop`**
    11  
    12  The `job stop` command is used to stop a running job and signals the scheduler
    13  to cancel all of the running allocations.
    14  
    15  ## Usage
    16  
    17  ```
    18  nomad job stop [options] <job>
    19  ```
    20  
    21  The `job stop` command requires a single argument, specifying the job ID or prefix to
    22  cancel. If there is an exact match based on the provided job ID or prefix, then
    23  the job will be cancelled. Otherwise, a list of matching jobs and information
    24  will be displayed.
    25  
    26  Stop will issue a request to deregister the matched job and then invoke an
    27  interactive monitor that exits automatically once the scheduler has processed
    28  the request. It is safe to exit the monitor early using ctrl+c.
    29  
    30  ## General Options
    31  
    32  <%= partial "docs/commands/_general_options" %>
    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  * `-verbose`: Show full information.
    42  
    43  * `-yes`: Automatic yes to prompts.
    44  
    45  * `-purge`: Purge is used to stop the job and purge it from the system. If not
    46  set, the job will still be queryable and will be purged by the garbage
    47  collector.
    48  
    49  
    50  ## Examples
    51  
    52  Stop the job with ID "job1":
    53  
    54  ```
    55  $ nomad job stop job1
    56  ==> Monitoring evaluation "43bfe672"
    57      Evaluation status changed: "pending" -> "complete"
    58  ==> Evaluation "43bfe672" finished with status "complete"
    59  ```
    60  
    61  Stop the job with ID "job1" and return immediately:
    62  
    63  ```
    64  $ nomad job stop -detach job1
    65  507d26cb
    66  ```