Skip to content

Commit

Permalink
Docs(job-specification/periodic): Add enabled toggle
Browse files Browse the repository at this point in the history
This is probably undocumented for a reason, but the `enabled` toggle in the
`periodic` stanza is very useful so I figured I try adding it to the docs.

The feature has been secretly avaliable since #9142 and was called out in that
PR as being a dubious addition, only added to avoid regressions.

The use case for disabling a periodic job in this way is to prevent it from
running without modifying the schedule. Ideally Nomad would make it more clear
that this was the case, and allow you to force a run of the job, but even with
those rough edges I think users would benefit from knowing about this toggle.
  • Loading branch information
pop authored and tgross committed Oct 3, 2022
1 parent 98deb8d commit 8d0a99c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/content/docs/job-specification/periodic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ consistent evaluation when Nomad spans multiple time zones.
be parsable by Golang's
[LoadLocation](https://golang.org/pkg/time/#LoadLocation).

- `enabled` `(bool: true)` - Specifies if this job should run. This not only
prevents this job from running on the `cron` schedule but prevents force
launches.

## `periodic` Examples

The following examples only show the `periodic` stanzas. Remember that the
Expand Down

0 comments on commit 8d0a99c

Please sign in to comment.