Files
nomad/website/content/docs/commands/alloc/pause.mdx
Aimee Ukasick dae496e427 Docs: SEO front matter description for search: commands section (#25175)
* Enhance front matter description for search

* acl section

* alloc section

* config section

* deployment section

* eval section

* job section

* license section

* namespace section

* node section

* node pool section

* operator section

* plugin section

* quota section

* recommendation section

* scaling section

* sentinel section

* server section

* service section

* setup section

* system section

* tls section

* var section

* volume section

* change reference to command reference

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-03-19 12:02:02 -05:00

75 lines
2.2 KiB
Plaintext

---
layout: docs
page_title: 'nomad alloc pause command reference'
description: |
The `nomad alloc pause` command overrides the schedule for tasks using time-based execution, forcing the task to either stop or run.
---
# `nomad alloc pause` command reference
Override the schedule for tasks using time based execution.
<EnterpriseAlert />
~> **Note:** Time based task execution is an experimental feature and subject
to change. This feature is supported for select customers. Please refer to the
[Upgrade Guide][upgrade] to find breaking changes.
## Usage
```plaintext
nomad alloc pause [options] <allocation> <command>
```
The `alloc pause` command allows a user to override the schedule for tasks
that use time based execution. A user may override a task's
[`schedule`][schedule] and force it to run or stop. The `schedule` will be
ignored until a user resets the override.
When ACLs are enabled, this command requires the `job-submit` capability for
the allocation's namespace.
## General options
@include 'general_options.mdx'
## Pause options
- `-state`: Override the current scheduled task state to be the specified state
or reset to the scheduled state. Must be one of `pause`, `run`, or
`scheduled`. When set to `pause` the task is halted. When set to `run` the
task is started. When set to `scheduled` the task respects its
[`schedule`][schedule].
- `-status`: Get the current time based task execution state.
- `-task`: Override the schedule of the specified task. May also be specified
as a positional argument.
- `-verbose`: Show full information.
## Examples
The following command stops the `schedtask` task of the allocation `4d37a9d1`
overriding the task's [`schedule`][schedule] block:
```shell-session
$ nomad alloc pause -state=pause 4d37a9d1 schedtask
```
The following command runs the task overriding the tasks current state or
schedule:
```shell-session
$ nomad alloc pause -state=pause 4d37a9d1 schedtask
```
The following command returns the task to its [`schedule`][schedule]:
```shell-session
$ nomad alloc pause -state=scheduled 4d37a9d1 schedtask
```
[schedule]: /nomad/docs/job-specification/schedule
[upgrade]: /nomad/docs/upgrade/upgrade-specific