2018-05-09 22:19:23 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: job eval'
|
|
|
|
sidebar_title: eval
|
|
|
|
description: |
|
2018-05-09 22:19:23 +00:00
|
|
|
The job eval command is used to force an evaluation of a job
|
|
|
|
---
|
|
|
|
|
|
|
|
# Command: job eval
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
The `job eval` command is used to force an evaluation of a job, given the job
|
|
|
|
ID.
|
2018-05-09 22:19:23 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```plaintext
|
2018-05-10 19:42:24 +00:00
|
|
|
nomad job eval [options] <job_id>
|
2018-05-09 22:19:23 +00:00
|
|
|
```
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
The `job eval` command requires a single argument, specifying the job ID to
|
|
|
|
evaluate. If there is an exact match based on the provided job ID, then the job
|
|
|
|
will be evaluated, forcing a scheduler run.
|
2018-05-09 22:19:23 +00:00
|
|
|
|
|
|
|
## General Options
|
|
|
|
|
2020-02-06 23:45:31 +00:00
|
|
|
@include 'general_options.mdx'
|
2018-05-09 22:19:23 +00:00
|
|
|
|
|
|
|
## Eval Options
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-force-reschedule`: `force-reschedule` is used to force placement of failed
|
|
|
|
allocations. If this is set, failed allocations that are past their reschedule
|
|
|
|
limit, and those that are scheduled to be replaced at a future time are placed
|
|
|
|
immediately. This option only places failed allocations if the task group has
|
|
|
|
rescheduling enabled.
|
2018-05-09 22:19:23 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-detach`: Return immediately instead of monitoring. A new evaluation ID
|
2018-05-11 18:39:55 +00:00
|
|
|
will be output, which can be used to examine the evaluation using the
|
2019-10-22 13:44:00 +00:00
|
|
|
[eval status] command.
|
2018-05-11 18:39:55 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-verbose`: Show full information.
|
2018-05-11 18:39:55 +00:00
|
|
|
|
2018-05-09 22:19:23 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Evaluate the job with ID "job1":
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```shell
|
2018-05-09 22:19:23 +00:00
|
|
|
$ nomad job eval job1
|
2018-05-21 22:20:59 +00:00
|
|
|
==> Monitoring evaluation "0f3bc0f3"
|
|
|
|
Evaluation triggered by job "test"
|
|
|
|
Evaluation within deployment: "51baf5c8"
|
|
|
|
Evaluation status changed: "pending" -> "complete"
|
|
|
|
==> Evaluation "0f3bc0f3" finished with status "complete"
|
|
|
|
```
|
|
|
|
|
|
|
|
Evaluate the job with ID "job1" and return immediately:
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```shell
|
2018-05-21 22:20:59 +00:00
|
|
|
$ nomad job eval -detach job1
|
|
|
|
Created eval ID: "4947e728"
|
2018-05-09 22:19:23 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Evaluate the job with ID "job1", and reschedule any eligible failed allocations:
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```shell
|
2018-05-09 22:19:23 +00:00
|
|
|
$ nomad job eval -force-reschedule job1
|
2018-05-21 22:20:59 +00:00
|
|
|
==> Monitoring evaluation "0f3bc0f3"
|
|
|
|
Evaluation triggered by job "test"
|
|
|
|
Evaluation within deployment: "51baf5c8"
|
|
|
|
Evaluation status changed: "pending" -> "complete"
|
|
|
|
==> Evaluation "0f3bc0f3" finished with status "complete"
|
2019-10-22 13:44:00 +00:00
|
|
|
```
|
|
|
|
|
2020-02-06 23:45:31 +00:00
|
|
|
[eval status]: /docs/commands/eval-status
|