Sequential and parallel execution of long-running shell commands
github.com
github.com
Seems like it has everything I need, the most crucial ones being separate queues / worker pools (f.ex. I only want the tasks that might involve source compilation to be executed one after another on a separate queue, never in parallel).
Anybody knows a good alternative to `multitail`? Still haven't found any other tool that can track the output of several commands at the same time on a screen that's automatically split -- and subsequently the finished tasks get removed from view until only the last one remains, taking the entire screen, and then it says "Done, press Q to quit".
GNU parallel is also an option, but it is written in Perl and has a larger footprint.
https://www.linuxjournal.com/content/parallel-shells-xargs-u...
I'm generally a big fan of showing alternatives: https://github.com/Nukesor/pueue/?tab=readme-ov-file#similar...
Would you be willing to write a proper guide on how to do all of these things in bash? It would be great to have such a guide inside the Pueue wiki and link to it. It'll help people to make a more informed decision on whether they need this tool or not.
[1] https://nats.io/
May I ask how many tasks you were managing with Pueue and what your usecase was?
I also thought about using alternative formats such as CBOR, but choosing a human-readable format like JSON made debugging and such a lot easier.
If there's a good usecase for it, I might consider switching to a more compact format.
zstd compressed that down to 5% of the size. I have the code still if you want to look at it but it was just a quick experiment so I didn't add any tests. I did add it to the config, disabled by default, though.
https://github.com/veyh/pueue/commit/e9dcf52227304b4b4a2ded4...
Protobuf could be a pretty good alternative. It can be dumped to a human-readable format with the protoc cli.
tmux my-command Ctrl-b d (detach) logout, go to bed, sleep, whatever log back into the server, tmux attach
Would there be an advantage to using this over that?
I'm still using it for your usecase, as I'm already used to the interface by now :D.
$ pueue Error: Couldn't find a configuration file. Did you start the daemon yet?
Run `pueued -d` first. I think this prompt should be printed on the screen the first time it runs, or automatically executed.
If one enqueues a single chain of tasks (no parallel tasks), is there a way to monitor stdout or stderror for the chain, without having to issue the follow command for each task at the time the task starts to run? This would provide better observability of what is running, as in a shell script with the tasks sequentially listed.
Oh that is sweet sweet music to my ears!
At first I thought it would just be a one-off tool I used for one of my projects, not until I discovered later that it has everything I need and became my daily driver ever since.
I still might write one as it would be a fun way to play around with some low level code, but when I actually want to get things done I'll be checking this out.
Pueue also allows you to do stuff like dependencies, which get tricky in bash if a task depends on more than one tasks finishing.
pueue add 'rsync somestuff host:location'
And if I notice any problems, I just do a `pueue edit $id` and I'm good to go. It's just a lot more convenient than manually building pipelines with files that'll be executed.
It would be something different if this was about recurrent tasks that needed to be done, though. But for one-off stuff, your approach seems a bit cumbersome.
>Pause/resume tasks, when you need some processing power right NOW!
How is the pause and resume done?
Perhaps by sending SIGSTOP and SIGCONT, much like hitting Ctrl+Z on the console and later running bg <pid> or fg <pid>.
Note that this is not the same as Ctrl+S & Ctrl+Q on the console – that just pauses the output display not the process (though the process may subsequently pause if a buffer somewhere down the pipeline becomes full due to the terminal output pausing).
I'm not exactly sure what advantage this has over managing `screen` sessions tho. Maybe it's cleaner from a process tree perspective?
> Pueue is not designed to be a programmable (scriptable) task scheduler/executor. The focus of pueue lies on human interaction.
So I also don't really see its usecase and probably would opt for tmux instead. If you had many workers to run, but still do it manually, you would use pueue? I would be interested in such a scenario!
The queue being persisted and surviving crashes could be useful, and isn't the case with tmux unless you manually script it up. Though it could be painful if the crash leaves things remaining tasks depend upon in an odd state…
The task tree could be useful: scheduling tasks to start once other tasks are completed.
How is it better than me having another window open and running my long running command there?
See https://github.com/Nukesor/pueue/wiki/FAQ#what-can-i-use-it-...
https://github.com/Nukesor/pueue/wiki/FAQ#why-should-i-use-i...
I specifically didn't want to further bloat the README, as it's already super long as it is.
Any alternatives similar to Pueue with capabilities of above?
I would be pretty stoked to be hired to build something like that, though.