layout | page_title | description |
---|---|---|
docs |
Commands: alloc pause |
Override the schedule for tasks using time based execution.
|
~> 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.
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.
@include 'general_options.mdx'
-
-state
: Override the current scheduled task state to be the specified state or reset to the scheduled state. Must be one ofpause
,run
, orscheduled
. When set topause
the task is halted. When set torun
the task is started. When set toscheduled
the task respects itsschedule
. -
-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.
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