github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/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 When ACLs are enabled, this command requires a token with the `submit-job`, 32 `read-job`, and `list-jobs` capabilities for the job's namespace. 33 34 ## General Options 35 36 @include 'general_options.mdx' 37 38 ## Stop Options 39 40 - `-detach`: Return immediately instead of entering monitor mode. After the 41 deregister command is submitted, a new evaluation ID is printed to the screen, 42 which can be used to examine the evaluation using the [eval status] command. 43 44 - `-verbose`: Show full information. 45 46 - `-yes`: Automatic yes to prompts. 47 48 - `-purge`: Purge is used to stop the job and purge it from the system. If not 49 set, the job will still be queryable and will be purged by the garbage 50 collector. 51 52 - `-global` 53 Stop a [multi-region] job in all its regions. By default, `job stop` will 54 stop only a single region at a time. Ignored for single-region jobs. 55 56 ## Examples 57 58 Stop the job with ID "job1": 59 60 ```shell-session 61 $ nomad job stop job1 62 ==> Monitoring evaluation "43bfe672" 63 Evaluation status changed: "pending" -> "complete" 64 ==> Evaluation "43bfe672" finished with status "complete" 65 ``` 66 67 Stop the job with ID "job1" and return immediately: 68 69 ```shell-session 70 $ nomad job stop -detach job1 71 507d26cb 72 ``` 73 74 [eval status]: /docs/commands/eval-status 75 [multi-region]: /docs/job-specification/multiregion