pueue-kill
Kill a running or queued pueue task
TLDR
Kill all tasks in the default group
Kill a specific task
Kill a task and terminate all its child processes
Kill all tasks in a group and pause the group
Kill all tasks across all groups and pause all groups
SYNOPSIS
pueue kill [options] [tasks...]
pueue-kill [options] [tasks...]
PARAMETERS
--all, -a
Kills all running or paused tasks managed by Pueue.
--group
Kills all running or paused tasks within the specified group
--signal
Specifies the signal to send. Can be a signal name (e.g., SIGTERM, SIGKILL) or a signal number. Default is SIGTERM.
--daemon
Specifies the Pueue daemon to connect to. Useful when running multiple daemons.
--config
Specifies the path to the pueue configuration file.
--log-level
Sets the logging level for the command's output (e.g., error, info, debug).
DESCRIPTION
pueue-kill is a command-line utility used to terminate tasks managed by the pueue task queue daemon. It allows users to stop currently running or paused tasks by sending a termination signal. By default, it sends SIGTERM, providing tasks an opportunity to shut down gracefully. Users can specify a different signal, such as SIGKILL, for immediate termination, though this should be used with caution as it prevents graceful shutdown.
Tasks can be targeted by their unique index, their name, or by specifying options to kill all tasks (--all), tasks within a particular group (--group), or tasks managed by a specific pueue daemon (--daemon). This command is essential for managing and responding to misbehaving or no longer needed tasks in the pueue environment. It's often invoked as a subcommand, pueue kill.
CAVEATS
Using SIGKILL (-s SIGKILL) forcefully terminates tasks without allowing them to perform cleanup, which can lead to data corruption or resource leaks. Use with caution.
Tasks that are already done, failed, or aborted cannot be killed; only running or paused tasks are affected.
SIGNAL HANDLING
pueue-kill wraps the underlying system's process signaling. Understanding different signals (e.g., SIGTERM for graceful shutdown, SIGKILL for immediate termination) is crucial for effective task management.
AFFECTED TASK STATES
Only tasks in the running or paused state can be targeted by pueue-kill. Tasks in other states (e.g., queued, done, failed) are not affected and will be ignored.
HISTORY
pueue is a modern task queue manager written in Rust. pueue-kill is an integral part of its command suite, designed to provide robust control over queued processes. It leverages standard Unix signaling mechanisms to interact with child processes launched by the pueue daemon, ensuring efficient task management.
SEE ALSO
pueue(1), kill(1), pueue-status(1), pueue-add(1)