github.com/hspak/nomad@v0.7.2-0.20180309000617-bc4ae22a39a5/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 Stop will issue a request to deregister the matched job and then invoke an 26 interactive monitor that exits automatically once the scheduler has processed 27 the request. It is safe to exit the monitor early using ctrl+c. 28 29 ## General Options 30 31 <%= partial "docs/commands/_general_options" %> 32 33 ## Stop Options 34 35 * `-detach`: Return immediately instead of entering monitor mode. After the 36 deregister command is submitted, a new evaluation ID is printed to the screen, 37 which can be used to examine the evaluation using the 38 [eval-status](/docs/commands/eval-status.html) command. 39 40 * `-verbose`: Show full information. 41 42 * `-yes`: Automatic yes to prompts. 43 44 * `-purge`: Purge is used to stop the job and purge it from the system. If not 45 set, the job will still be queryable and will be purged by the garbage 46 collector. 47 48 49 ## Examples 50 51 Stop the job with ID "job1": 52 53 ``` 54 $ nomad stop job1 55 ==> Monitoring evaluation "43bfe672" 56 Evaluation status changed: "pending" -> "complete" 57 ==> Evaluation "43bfe672" finished with status "complete" 58 ``` 59 60 Stop the job with ID "job1" and return immediately: 61 62 ``` 63 $ nomad stop -detach job1 64 507d26cb 65 ```