Skip to content

Commit

Permalink
backport of commit 4e33af6
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Oct 4, 2022
1 parent 7502289 commit ae24174
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions command/job_dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ Dispatch Options:
Optional identifier used to prevent more than one instance of the job from
being dispatched.
-id-prefix-template
Optional prefix template for dispatched job IDs.
-verbose
Display full information.
`
Expand Down
18 changes: 18 additions & 0 deletions website/content/docs/commands/job/dispatch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ dispatching parameterized jobs.
- `-idempotency-token`: Optional identifier used to prevent more than one
instance of the job from being dispatched.


- `-id-prefix-template`: Optional prefix template for dispatched job IDs.

- `-verbose`: Show full information.

## Examples
Expand Down Expand Up @@ -141,6 +144,21 @@ $ nomad job dispatch -idempotency-token=prod video-encode video-config.json
Job "video-encode/dispatch-1485379325-cb38d00d" already dispatched with idempotency token "prod".
```

Dispatch with an id prefix:

```shell-session
$ nomad job dispatch -id-prefix-template=config1 video-encode video-config1.json
Jb
Dispatched Job ID = video-encode/dispatch-config1-1485379325-cb38d00d
Evaluation ID = 31199841
==> Monitoring evaluation "31199841"
Evaluation triggered by job "example/dispatch-config1-1485379325-cb38d00d"
Allocation "8254b85f" created: node "82ff9c50", group "cache"
Evaluation status changed: "pending" -> "complete"
==> Evaluation "31199841" finished with status "complete"
```

[eval status]: /docs/commands/eval/status
[parameterized job]: /docs/job-specification/parameterized 'Nomad parameterized Job Specification'
[multiregion]: /docs/job-specification/multiregion#parameterized-dispatch

0 comments on commit ae24174

Please sign in to comment.