Skip to content

Commit

Permalink
Docs for job eval CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
preetapan committed May 9, 2018
1 parent 2d0e273 commit b5e18b6
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/source/docs/commands/job.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ subcommands are available:

* [`job deployments`][deployments] - List deployments for a job
* [`job dispatch`][dispatch] - Dispatch an instance of a parameterized job
* [`job eval`][eval] - Force an evaluation for a job
* [`job history`][history] - Display all tracked versions of a job
* [`job promote`][promote] - Promote a job's canaries
* [`job revert`][revert] - Revert to a prior version of the job
* [`job status`][status] - Display status information about a job

[deployments]: /docs/commands/job/deployments.html "List deployments for a job"
[dispatch]: /docs/commands/job/dispatch.html "Dispatch an instance of a parameterized job"
[eval]: /docs/commands/job/eval.html "Force an evaluation for a job"
[history]: /docs/commands/job/history.html "Display all tracked versions of a job"
[promote]: /docs/commands/job/promote.html "Promote a job's canaries"
[revert]: /docs/commands/job/revert.html "Revert to a prior version of the job"
Expand Down
48 changes: 48 additions & 0 deletions website/source/docs/commands/job/eval.html.md.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
layout: "docs"
page_title: "Commands: job eval"
sidebar_current: "docs-commands-job-eval"
description: >
The job eval command is used to force an evaluation of a job
---

# Command: job eval

The `job eval` command is used to force an evaluation of a job, given the job ID.

## Usage

```
nomad job eval [options] <jobID>
```

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.

## General Options

<%= partial "docs/commands/_general_options" %>

## Eval Options

* `-force-reschedule`: `force-reschedule` is used to force placement of any failed allocations.
If this is set, failed allocations that are past their reschedule limit, as well as any 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.

## Examples

Evaluate the job with ID "job1":

```
$ nomad job eval job1
Created eval ID: "6754c2e3-9abb-e7e9-dc92-76aab01751c8"
```

Evaluate the job with ID "job1", and reschedule any eligible failed allocations:

```
$ nomad job eval -force-reschedule job1
Created eval ID: "6754c2e3-9abb-e7e9-dc92-76aab01751c8"
```
3 changes: 3 additions & 0 deletions website/source/layouts/docs.erb
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@
<li<%= sidebar_current("docs-commands-job-dispatch") %>>
<a href="/docs/commands/job/dispatch.html">dispatch</a>
</li>
<li<%= sidebar_current("docs-commands-job-eval") %>>
<a href="/docs/commands/job/eval.html">eval</a>
</li>
<li<%= sidebar_current("docs-commands-job-history") %>>
<a href="/docs/commands/job/history.html">history</a>
</li>
Expand Down

0 comments on commit b5e18b6

Please sign in to comment.