pueue-group
Manage groups of enqueued tasks
TLDR
Show all groups with their statuses and number of parallel jobs
Add a custom group
Remove a group and move its tasks to the default group
SYNOPSIS
pueue group [SUBCOMMAND] [OPTIONS] [GROUP_NAME]
PARAMETERS
add NAME
Adds a new task group with the specified NAME.
remove NAME
Removes the task group with the specified NAME. This will move any remaining tasks in that group to the default group.
list
Lists all existing task groups, their current states (e.g., running, paused), and configuration (e.g., parallel limit).
switch NAME
Sets the default group for new tasks added via pueue add to the specified NAME. Subsequent pueue add commands will place tasks into this group unless a specific group is specified with --group.
pause [NAME]
Pauses the specified group NAME. If no NAME is provided, it pauses the default group. Paused groups will not execute any tasks until resumed.
resume [NAME]
Resumes the specified group NAME. If no NAME is provided, it resumes the default group. Tasks in resumed groups will begin execution according to their configuration.
set NAME --parallel COUNT
Sets the maximum number of tasks that can run concurrently within the specified group NAME to COUNT. For example, --parallel 2 allows two tasks to run simultaneously.
set NAME --sequential
Configures the specified group NAME to run tasks sequentially, one after another. This is equivalent to --parallel 1.
--force
Used with remove, forces the removal of a group even if it contains tasks. These tasks will be moved to the default group.
DESCRIPTION
pueue-group is a subcommand of the Pueue task queue manager, specifically designed for organizing and controlling collections of tasks. It allows users to define, list, and modify execution properties for different task groups. This is particularly useful for separating diverse workloads, prioritizing specific sets of tasks, or controlling the parallel execution of commands within isolated contexts.
By creating groups, users can add tasks to a specific group, pause or resume entire sets of operations, and configure the concurrency level (e.g., how many tasks can run in parallel) for each group independently. This enhances the flexibility and power of Pueue, enabling more sophisticated task management beyond a single, global queue.
CAVEATS
When a group is removed, any tasks remaining in that group are automatically moved to the default group. Be mindful that configuring a group as 'sequential' or with a low 'parallel' count can significantly impact the overall throughput of your queued tasks if many are assigned to that group.
DEFAULT GROUP
Upon installation, Pueue automatically creates a 'default' group. Any tasks added without explicitly specifying a group (e.g., pueue add ls) are placed into this default group. The pueue group switch command changes which group acts as the 'default' for new tasks.
ADDING TASKS TO GROUPS
Tasks can be explicitly assigned to a specific group using the --group option with the pueue add command (e.g., pueue add --group my_build_tasks 'make all'). This overrides the currently active default group.
HISTORY
Pueue, initially released in 2018, rapidly evolved as a lightweight command-line task queue. The concept of task groups was introduced in later versions to address the growing need for more granular control over task execution and organization. This feature significantly enhanced Pueue's utility, moving it beyond a simple FIFO queue to a more sophisticated job scheduler capable of handling diverse workloads with distinct execution policies.