pueue-pause
Pause all running or queued pueue tasks
TLDR
Pause all tasks in the default group
Pause a running task
Pause a running task and stop all its direct children
Pause all tasks in a group and prevent it from starting new tasks
Pause all tasks and prevent all groups from starting new tasks
SYNOPSIS
pueue pause [-a | --all] | [-g name | --group name] | [task_id...]
PARAMETERS
-a, --all
Pauses all tasks managed by Pueue, across all groups. This is a global pause operation.
-g name, --group name
Pauses all tasks belonging to the specified task group. If no group is specified, the default group is assumed. This flag allows targeting a specific group for the pause operation.
task_id...
One or more space-separated task IDs to be paused. These are positional arguments. Task IDs can be obtained using the pueue status command. If no options (-a, -g) are provided, this command expects at least one task ID.
DESCRIPTION
The pueue-pause command, part of the Pueue task queue manager, is used to halt the execution of tasks that are currently running or to prevent tasks from starting if they are in the 'queued' state. When a task is paused, Pueue sends a SIGSTOP signal to the running process, effectively suspending its execution. Queued tasks that are paused will not be started until they are resumed. This command is useful for temporarily stopping resource-intensive jobs, troubleshooting, or prioritizing other tasks.
You can pause specific tasks by their IDs, all tasks across all groups, or all tasks within a particular group. Paused tasks retain their position in the queue and can be resumed later using the pueue-resume command.
CAVEATS
For pueue-pause to function, the Pueue daemon must be running in the background. If the daemon is not active, the command will fail to connect.
While Pueue attempts to pause running processes by sending a SIGSTOP signal, some applications might not handle this signal gracefully or might be in an uninterruptible state, leading to a delay or failure in pausing.
Pausing a task only affects its execution state within Pueue; it does not affect any external resources or processes that might have been spawned by the task outside of Pueue's direct control.
HOW PAUSING WORKS
When pueue pause is executed for a running task, Pueue sends a SIGSTOP signal to the task's process. This signal instructs the operating system to suspend the process's execution. The process remains in memory but is not scheduled to run. When a task is resumed with pueue-resume, a SIGCONT signal is sent, allowing the process to continue from where it left off.
IDEMPOTENCY
The pueue pause command is idempotent. This means that pausing a task that is already in a 'paused' state will have no additional effect and will not result in an error. This behavior ensures that repeated calls to pause a task or group do not cause unintended side effects.
HISTORY
Pueue is a modern command-line task queue daemon written in Rust, designed to be a simple, robust, and user-friendly alternative for managing background tasks and long-running processes. It was created to address the need for a straightforward way to queue and execute commands sequentially or in parallel without complex configurations. The core pueue client and its subcommands, including pueue-pause, have been integral to its design since early development, evolving to provide reliable task control for various use cases, from software compilation to data processing.
SEE ALSO
pueue(1), pueue-start(1), pueue-add(1), pueue-status(1), pueue-resume(1), pueue-remove(1)