pueue-send
Send input to a running pueue process
TLDR
Send input to a running command
Send confirmation to a task expecting y/N (e.g. APT, cp)
SYNOPSIS
pueue-send [OPTIONS] <COMMAND> [ARGUMENTS...]
PARAMETERS
-d, --delay
Delays the execution of the task. Duration can be a number (seconds), or a time string like "10s", "5m", "1h", "tomorrow 10:00".
-s, --start-immediately
Starts the task immediately, even if the queue is currently paused.
-p, --path
Sets the working directory for the command's execution.
-l, --label
Assigns a custom label to the task for easier identification in the task list.
-g, --group
Adds the task to a specific group. If the group doesn't exist, it will be created.
-a, --after
Executes this task only after the specified task ID has finished successfully.
-N, --no-auto-start
Adds the task to the queue but prevents it from starting automatically. It will remain 'Stalled' until manually started.
-P, --print-task-id
Prints the ID of the newly added task to standard output upon successful submission.
--priority
Sets the numerical priority of the task. Higher numbers indicate higher priority (e.g., 0-100).
--env
Sets an environment variable for the task's execution. Can be specified multiple times.
--shell
Specifies the shell to use for executing the command (e.g., /bin/bash, /usr/bin/zsh).
--stgout
Configures Pueue to store the task's standard output to a file.
--stgerr
Configures Pueue to store the task's standard error to a file.
--stgmerge
Merges standard error into standard output for storage purposes.
--pre-command
Executes a command before the main task begins. This command runs in the same environment as the main task.
--post-command
Executes a command after the main task completes, regardless of its success or failure.
--dependencies
Sets dependencies on other tasks; this task will only run after all specified tasks complete successfully. Multiple IDs can be space-separated.
DESCRIPTION
pueue-send is a core command of the Pueue project, a robust command-line task queue and job scheduler for Linux and macOS. It is primarily used to submit new commands or scripts to the Pueue daemon, which then executes them asynchronously in the background. This allows users to queue long-running tasks without blocking their terminal, retrieving their output and status later.
pueue-send offers extensive options to control how a task is executed, including specifying a working directory, delaying execution, assigning custom labels or groups, setting priorities, and defining dependencies on other tasks. It provides a convenient way to manage a personal queue of background jobs, enhancing productivity for developers, system administrators, and anyone needing to run multiple background processes efficiently.
CAVEATS
Before using pueue-send, ensure that the Pueue daemon (pueued) is running in the background. Without the daemon, tasks cannot be queued or executed.
Tasks submitted via pueue-send are designed to run asynchronously; their output and status must be checked using other Pueue commands like pueue status or pueue log, as they do not provide immediate interactive feedback.
DEFAULT OUTPUT STORAGE
By default, Pueue captures and stores the standard output and standard error of all tasks submitted via pueue-send. You can view these logs later using the pueue log command. Use --no-stgout or --no-stgerr to explicitly disable this behavior for specific streams if output storage is not desired for a particular task.
TASK IDS
Every task added to Pueue is assigned a unique numerical ID. This ID is crucial for interacting with tasks using other Pueue commands (e.g., pueue status <ID>, pueue remove <ID>). You can explicitly request this ID to be printed to your terminal immediately after submission using the -P or --print-task-id option, which is useful for scripting.
HISTORY
Pueue emerged as a modern, user-friendly alternative to traditional Linux job schedulers like at or more complex batch systems. Its development, primarily in Rust, started around 2018-2019, driven by the need for a simple yet powerful command-line task queue that integrates well with modern developer workflows. It aims to provide intuitive control over personal background processes without the overhead of full-fledged job schedulers, focusing on ease of use and persistent task management.