Skip to content

Commit

Permalink
docs: explain schedule state values
Browse files Browse the repository at this point in the history
GET /v1/client/allocation/:alloc_id/pause?task=:task_name is a tiny but
critical API for observability of tasks with a schedule. This PR
explains each of the values which might be returned.
  • Loading branch information
schmichael committed Oct 9, 2024
1 parent 278a2df commit f142c21
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions website/content/api-docs/allocations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1018,12 +1018,12 @@ The table below shows this endpoint's support for

### Parameters

- `:alloc_id` `(string: <required>)`- Specifies the UUID of the allocation. This
must be the full UUID, not the short 8-character one. This is specified as
part of the path.
- `:alloc_id` `(string: <required>)` - Specifies the UUID of the allocation.
This must be the full UUID, not the short 8-character one. This is
specified as part of the path.

- `task` - Specifies the task from which to retrieve the time based task
execution state.
- `task` `(string: <required>)` - Specifies the name of the task from which to
retrieve the time based task execution state.

### Sample Request

Expand All @@ -1039,5 +1039,22 @@ $ nomad operator api /v1/client/allocation/23f520cc-629a-46ff-395f-0661e7aa939e/
}
```

#### Field Reference

- `ScheduledState` `(string)`: The task's current paused state. It can can have
one of the following values:

- `""` - The task is running. The only state returned for tasks with no
schedule.

- `force_run` - The task's scheduled has been overridden to run.

- `scheduled_pause` - The task is paused according to its schedule.

- `schedule_resume` - A schedule override is being removed. Subsequent calls
should return running (`""`) or paused (`scheduled_pause`) states. This
state is rarely possible to observe since it transitions immediately to
another state.

[`shutdown_delay`]: /nomad/docs/job-specification/group#shutdown_delay
[schedule]: /nomad/docs/job-specification/schedule

0 comments on commit f142c21

Please sign in to comment.