github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/job/stop.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Commands: job stop' 4 description: | 5 The job stop command is used to stop a running job. 6 --- 7 8 # Command: job stop 9 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 the running allocations. 14 15 ## Usage 16 17 ```plaintext 18 nomad job stop [options] <job> 19 ``` 20 21 The `job stop` command requires a single argument, specifying the job ID or 22 prefix to cancel. If there is an exact match based on the provided job ID or 23 prefix, then the job will be cancelled. Otherwise, a list of matching jobs and 24 information 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 When ACLs are enabled, this command requires a token with the `submit-job`, 31 `read-job`, and `list-jobs` capabilities for the job's namespace. 32 33 ## General Options 34 35 @include 'general_options.mdx' 36 37 ## Stop Options 38 39 - `-detach`: Return immediately instead of entering monitor mode. After the 40 deregister command is submitted, a new evaluation ID is printed to the screen, 41 which can be used to examine the evaluation using the [eval status] command. 42 43 - `-eval-priority`: Override the priority of the evaluations produced as a result 44 of this job deregistration. By default, this is set to the priority of the job. 45 46 - `-verbose`: Show full information. 47 48 - `-yes`: Automatic yes to prompts. 49 50 - `-purge`: Purge is used to stop the job and purge it from the system. If not 51 set, the job will still be queryable and will be purged by the garbage 52 collector. 53 54 - `-global` 55 Stop a [multi-region] job in all its regions. By default, `job stop` will 56 stop only a single region at a time. Ignored for single-region jobs. 57 58 - `-no-shutdown-delay` 59 Ignore the group and task [`shutdown_delay`] configuration so that 60 there is no delay between service deregistration and task 61 shutdown. Note that using this flag will result in failed network 62 connections to the allocations being stopped. 63 64 ## Examples 65 66 Stop the job with ID "job1": 67 68 ```shell-session 69 $ nomad job stop job1 70 ==> Monitoring evaluation "43bfe672" 71 Evaluation status changed: "pending" -> "complete" 72 ==> Evaluation "43bfe672" finished with status "complete" 73 ``` 74 75 Stop the job with ID "job1" and return immediately: 76 77 ```shell-session 78 $ nomad job stop -detach job1 79 507d26cb 80 ``` 81 82 [eval status]: /docs/commands/eval/status 83 [multi-region]: /docs/job-specification/multiregion 84 [`shutdown_delay`]: /docs/job-specification/group#shutdown_delay