diff --git a/website/source/api/json-jobs.html.md b/website/source/api/json-jobs.html.md index e705bfa07..1948ab802 100644 --- a/website/source/api/json-jobs.html.md +++ b/website/source/api/json-jobs.html.md @@ -96,6 +96,10 @@ Below is the JSON representation of the job outputted by `$ nomad init`: "Delay": 15000000000, "Mode": "fail" }, + "ReschedulePolicy": { + "Interval": 300000000000, + "Attempts": 10, + }, "EphemeralDisk": { "SizeMB": 300 } diff --git a/website/source/docs/job-specification/reschedule.html.md b/website/source/docs/job-specification/reschedule.html.md index cf32ceb49..8e2aaf8a1 100644 --- a/website/source/docs/job-specification/reschedule.html.md +++ b/website/source/docs/job-specification/reschedule.html.md @@ -3,10 +3,11 @@ layout: "docs" page_title: "reschedule Stanza - Job Specification" sidebar_current: "docs-job-specification-reschedule" description: |- - The "reschedule" stanza specifies the group's rescheduling strategy upon allocation failures. - The reschedule strategy can be configured with number of attempts and a time interval. - Nomad will only attempt to reschedule failed allocations on to another node only after - any local [restarts](docs/job-specification/restart.html) have been exceeded. + The "reschedule" stanza specifies the group's rescheduling strategy upon + allocation failures. The reschedule strategy can be configured with number + of attempts and a time interval. Nomad will only attempt to reschedule + failed allocations on to another node only after any local [restarts](docs/job-specification/restart.html) + have been exceeded. --- # `reschedule` Stanza @@ -23,14 +24,15 @@ description: |- -The `reschedule` stanza specifies the group's rescheduling strategy. -It can be configured with number of attempts and a time interval. -If specified at the job level, the configuration will apply to all groups within the job. -If multiple `reschedule` stanzas are specified, they are merged with the group stanza -taking the highest precedence and then the job. +The `reschedule` stanza specifies the group's rescheduling strategy. It can be +configured with number of attempts and a time interval. If specified at the job +level, the configuration will apply to all groups within the job. If the +reschedule stanza is present on both the job and the group, they are merged with +the group stanza taking the highest precedence and then the job. -Nomad will attempt to schedule the task on another node if any of its allocation statuses become -"failed". It prefers to create a replacement allocation on a node that hasn't previously been used. +Nomad will attempt to schedule the task on another node if any of its allocation +statuses become "failed". It prefers to create a replacement allocation on a node +that hasn't previously been used. ```hcl job "docs" { @@ -43,28 +45,30 @@ job "docs" { } ``` -~> The reschedule stanza does not apply to `system` jobs because they run on every node. +~> The reschedule stanza does not apply to `system` jobs because they run on + every node. ## `reschedule` Parameters -- `attempts` `(int: )` - Specifies the number of reschedule attempts allowed in the - configured interval. Defaults vary by job type, see below for more - information. +- `attempts` `(int: )` - Specifies the number of reschedule attempts + allowed in the configured interval. Defaults vary by job type, see below + for more information. -- `interval` `(string: )` - Specifies the duration which begins when the - first reschedule attempt starts and ensures that only `attempts` number of reschedule happen - within it. If more than `attempts` number of failures happen with this interval, Nomad will - not reschedule any more. +- `interval` `(string: )` - Specifies the sliding window which begins + when the first reschedule attempt starts and ensures that only `attempts` + number of reschedule happen within it. If more than `attempts` number of + failures happen with this interval, Nomad will not reschedule any more. -Information about reschedule attempts are displayed in the CLI and API for allocations. -Rescheduling is enabled by default for service and batch jobs with the options shown below. +Information about reschedule attempts are displayed in the CLI and API for +allocations. Rescheduling is enabled by default for service and batch jobs +with the options shown below. ### `reschedule` Parameter Defaults -The values for the `reschedule` parameters vary by job type. Here are the +The values for the `reschedule` parameters vary by job type. Below are the defaults by job type: -- The default batch reschedule policy is: +- The Default Batch Reschedule Policy is: ```hcl reschedule { @@ -73,7 +77,7 @@ defaults by job type: } ``` -- The default non-batch reschedule policy is: +- The Default Service Reschedule Policy is: ```hcl reschedule {