Skip to content

Latest commit

 

History

History
74 lines (51 loc) · 2.06 KB

pause.mdx

File metadata and controls

74 lines (51 loc) · 2.06 KB
layout page_title description
docs
Commands: alloc pause
Override the schedule for tasks using time based execution.

Command: alloc pause

~> 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 to find breaking changes.

Override the schedule for tasks using time based execution.

Usage

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 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.

  • -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 block:

$ nomad alloc pause -state=pause 4d37a9d1 schedtask

The following command runs the task overriding the tasks current state or schedule:

$ nomad alloc pause -state=pause 4d37a9d1 schedtask

The following command returns the task to its schedule:

$ nomad alloc pause -state=scheduled 4d37a9d1 schedtask