diff --git a/website/content/docs/job-specification/restart.mdx b/website/content/docs/job-specification/restart.mdx index 5b0883665..7347deba6 100644 --- a/website/content/docs/job-specification/restart.mdx +++ b/website/content/docs/job-specification/restart.mdx @@ -122,6 +122,21 @@ defaults by job type: } ``` +### Disabling restart + +To disable restarting, set the `attempts` parameter to zero and `mode` to `"fail"`. + +```hcl +job "docs" { + group "example" { + restart { + attempts = 0 + mode = "fail" + } + } +} +``` + ### `mode` Values This section details the specific values for the "mode" parameter in the Nomad