2019-04-12 18:56:02 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: job periodic force'
|
2019-04-12 18:56:02 +00:00
|
|
|
description: >
|
2020-02-06 23:45:31 +00:00
|
|
|
The job periodic force command is used to force the evaluation of a periodic
|
|
|
|
job.
|
2019-04-12 18:56:02 +00:00
|
|
|
---
|
|
|
|
|
2019-06-05 15:09:22 +00:00
|
|
|
# Command: job periodic force
|
2019-04-12 18:56:02 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
The `job periodic force` command is used to [force the evaluation] of a
|
|
|
|
[periodic job].
|
2019-04-12 18:56:02 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```plaintext
|
2019-04-12 18:56:02 +00:00
|
|
|
nomad job periodic force [options] <job id>
|
|
|
|
```
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
The `job periodic force` command requires a single argument, specifying the ID
|
|
|
|
of the job. This job must be a periodic job. This is used to immediately run a
|
|
|
|
periodic job, even if it violates the job's `prohibit_overlap` setting.
|
2019-04-12 18:56:02 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
By default, on successful job submission the command will enter an interactive
|
|
|
|
monitor and display log information detailing the scheduling decisions and
|
|
|
|
placement information for the forced evaluation. The monitor will exit after
|
|
|
|
scheduling has finished or failed.
|
2019-04-12 18:56:02 +00:00
|
|
|
|
2020-11-19 21:38:08 +00:00
|
|
|
When ACLs are enabled, this command requires a token with the `submit-job`
|
2023-03-09 20:00:04 +00:00
|
|
|
capability for the job's namespace. The `list-jobs` capability is required to
|
|
|
|
run the command with a job prefix instead of the exact job ID. The `read-job`
|
|
|
|
capability is required to monitor the resulting evaluation when `-detach` is
|
|
|
|
not used.
|
2020-11-19 21:38:08 +00:00
|
|
|
|
2019-04-12 18:56:02 +00:00
|
|
|
## General Options
|
|
|
|
|
2020-02-06 23:45:31 +00:00
|
|
|
@include 'general_options.mdx'
|
2019-04-12 18:56:02 +00:00
|
|
|
|
|
|
|
## Run Options
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-detach`: Return immediately instead of monitoring. A new evaluation ID
|
2019-04-12 18:56:02 +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.
|
2019-04-12 18:56:02 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-verbose`: Show full information.
|
2019-04-12 18:56:02 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Force the evaluation of the job `example`, monitoring placement:
|
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job periodic force example
|
2019-04-12 18:56:02 +00:00
|
|
|
==> Monitoring evaluation "54b2d6d9"
|
|
|
|
Evaluation triggered by job "example/periodic-1555094493"
|
|
|
|
Allocation "637aee17" created: node "a35ab8fc", group "cache"
|
|
|
|
Allocation "637aee17" status changed: "pending" -> "running" (Tasks are running)
|
|
|
|
Evaluation status changed: "pending" -> "complete"
|
|
|
|
==> Evaluation "54b2d6d9" finished with status "complete"
|
|
|
|
```
|
|
|
|
|
|
|
|
Force the evaluation of the job `example` and return immediately:
|
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job periodic force -detach example
|
2019-04-12 18:56:02 +00:00
|
|
|
Force periodic successful
|
|
|
|
Evaluation ID: 0865fbf3-30de-5f53-0811-821e73e63178
|
|
|
|
```
|
2019-10-22 13:44:00 +00:00
|
|
|
|
2023-01-25 17:31:14 +00:00
|
|
|
[eval status]: /nomad/docs/commands/eval/status
|
|
|
|
[force the evaluation]: /nomad/api-docs/jobs#force-new-periodic-instance
|
|
|
|
[periodic job]: /nomad/docs/job-specification/periodic
|