--- obj: application repo: https://github.com/nukesor/pueue --- # pueue Pueue is a command-line task management tool for sequential and parallel execution of long-running tasks. Simply put, it's a tool that **p**rocesses a q**ueue** of [shell](Shell.md) commands. On top of that, there are a lot of convenient features and abstractions. Since Pueue is not bound to any terminal, you can control your tasks from any terminal on the same machine. The queue will be continuously processed, even if you no longer have any active [ssh](../network/SSH.md) sessions. ## Start the Daemon Before you can use the `pueue` client, you have to start the daemon. **Local:** The daemon can be run in the current [shell](Shell.md). Just run `pueued` anywhere on your command line. It'll exit if you close the terminal, though. **Background:** To fork and run `pueued` into the background, add the `-d` or `--daemonize` flag. E.g. `pueued -d`. The daemon can always be shut down using the client command `pueue shutdown`. ### Systemd [Systemd](../../linux/systemd/Systemd.md) user services allow every user to start/enable their own session on [Linux](../../linux/Linux.md) operating system distributions. If you didn't install Pueue with a package manager, follow these instructions first: 1. download `pueued.service` from the GitHub Releases page; 2. place `pueued.service` in `/etc/systemd/user/` or `~/.config/systemd/user/`; 3. make sure the `pueued` binary is placed at `/usr/bin`, which is where `pueued.service` expects is to be. Then, regardless of how you installed Pueue, run: 1. `systemctl --user start pueued`, to start the `pueued` service; 2. `systemctl --user enable pueued`, to run the `pueued` service at system startup; 3. `systemctl --user status pueued`, to ensure it is **active (running)**. ## Using pueue Usage: `pueue ` ### `pueue add` Enqueue a task for execution. Usage: `pueue add ` #### Options | Option | Description | | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-w, --working-directory ` | Specify current working directory | | `-e, --escape` | Escape any special [shell](Shell.md) characters (" ", "&", "!", etc.). Beware: This implicitly disables nearly all [shell](Shell.md) specific syntax ("&&", "&>") | | `-i, --immediate` | Immediately start the task | | `-s, --stashed` | Create the task in Stashed state. Useful to avoid immediate execution if the queue is empty | | `-d, --delay ` | Prevents the task from being enqueued until \ elapses. | | `-g, --group ` | Assign the task to a group. Groups kind of act as separate queues. I.e. all groups run in parallel and you can specify the amount of parallel tasks for each group. If no group is specified, the default group will be used | | `-a, --after ` | Start the task once all specified tasks have successfully finished. As soon as one of the dependencies fails, this task will fail as well | | `-o, --priority ` | Start this task with a higher priority. The higher the number, the faster it will be processed | | `-l, --label