github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/website/pages/docs/commands/job/stop.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: job stop'
     4  sidebar_title: stop
     5  description: |
     6    The job stop command is used to stop a running job.
     7  ---
     8  
     9  # Command: job stop
    10  
    11  **Alias: `nomad stop`**
    12  
    13  The `job stop` command is used to stop a running job and signals the scheduler
    14  to cancel all of the running allocations.
    15  
    16  ## Usage
    17  
    18  ```plaintext
    19  nomad job stop [options] <job>
    20  ```
    21  
    22  The `job stop` command requires a single argument, specifying the job ID or
    23  prefix to cancel. If there is an exact match based on the provided job ID or
    24  prefix, then the job will be cancelled. Otherwise, a list of matching jobs and
    25  information will be displayed.
    26  
    27  Stop will issue a request to deregister the matched job and then invoke an
    28  interactive monitor that exits automatically once the scheduler has processed
    29  the request. It is safe to exit the monitor early using ctrl+c.
    30  
    31  ## General Options
    32  
    33  @include 'general_options.mdx'
    34  
    35  ## Stop Options
    36  
    37  - `-detach`: Return immediately instead of entering monitor mode. After the
    38    deregister command is submitted, a new evaluation ID is printed to the screen,
    39    which can be used to examine the evaluation using the [eval status] 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  ## Examples
    50  
    51  Stop the job with ID "job1":
    52  
    53  ```shell-sessionnomad job stop job1
    54  ==> Monitoring evaluation "43bfe672"
    55      Evaluation status changed: "pending" -> "complete"
    56  ==> Evaluation "43bfe672" finished with status "complete"
    57  ```
    58  
    59  Stop the job with ID "job1" and return immediately:
    60  
    61  ```shell-sessionnomad job stop -detach job1
    62  507d26cb
    63  ```
    64  
    65  [eval status]: /docs/commands/eval-status