LinuxCommandLibrary

pueue

Queue and manage shell commands serially

TLDR

Show general help and available subcommands

$ pueue [[-h|--help]]
copy

Execute a pueue subcommand
$ pueue [subcommand]
copy

Check the version of pueue
$ pueue [[-V|--version]]
copy

SYNOPSIS

pueue [options] [arguments]

PARAMETERS

add
    Adds a new task to the queue to execute the given shell command.

start [id]
    Starts the next task in the queue or a specific task by its ID.

restart [id]
    Restarts a finished or failed task by its ID.

pause
    Pauses the Pueue daemon, preventing new tasks from starting.

resume
    Resumes the Pueue daemon, allowing new tasks to start.

remove
    Removes a task from the queue by its ID.

kill
    Kills a running task by its ID. It sends SIGKILL to the process.

edit
    Opens the task's command in a text editor to modify it.

log [id]
    Shows the log output of a specific task by its ID or all logs if no ID is provided.

status
    Displays the current status of the Pueue daemon and the task queue.

clean
    Removes all finished or failed tasks from the queue.

reset
    Removes all tasks from the queue and clears all logs. Use with caution!

--help
    Displays help information about a specific command.

--version
    Displays the version of Pueue.

DESCRIPTION

Pueue is a command-line task manager that allows you to manage long-running, sequential tasks. It decouples task submission from execution, allowing you to submit jobs and disconnect from the terminal. Pueue manages a queue of tasks, executing them in the order they were added, with built-in features for pausing, resuming, retrying, and managing task dependencies. It's especially useful for automating workflows, background processing, and handling tasks that take significant time to complete. The client-server architecture ensures that tasks continue executing even if your terminal session closes or your computer restarts. Pueue provides a centralized view of task status, logs, and allows for easy manipulation of the task queue.

Unlike simple `nohup` commands, Pueue maintains a persistent queue and allows you to interact with tasks after submission. It's a lightweight alternative to full-fledged job schedulers for single-user environments or smaller teams.

CAVEATS

Pueue relies on a running daemon. Ensure the daemon is running before using the client. If the daemon crashes unexpectedly, running tasks may be lost. Pueue doesn't inherently provide resource management or scheduling beyond sequential execution.

Error handling depends on the executed command. Pueue reports the command's exit code, but detailed error analysis requires inspecting the task logs.

CONFIGURATION

Pueue's configuration file is located at `~/.config/pueue/pueue.yml`. This file allows you to customize various aspects of Pueue, such as the port used for communication, the default directory for task execution, and the maximum number of parallel tasks (though parallel task execution is not the primary design goal). You can configure things like the used editor, default queue, and log levels. You can define groups of task and much more.

DAEMON MANAGEMENT

The Pueue daemon is responsible for executing tasks. It can be started with `pueue start`. It will run in the background. You can stop the daemon with `pueue stop`. The daemon state is managed by Pueue automatically. Pueue client detects automatically if the daemon isn't running and provides error output.

SEE ALSO

at(1), batch(1), nohup(1), screen(1), tmux(1)

Copied to clipboard