From fd95baa09a45fa657cd83144d63e0110f8d75a59 Mon Sep 17 00:00:00 2001 From: Brian Woods Date: Sun, 19 Mar 2023 15:34:13 -0400 Subject: queue: add base files for queuing system Add a simple command queuing system. Simple but useful for adding multiple commands to a queue to run sequentially. --- queue/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 queue/README.md (limited to 'queue/README.md') diff --git a/queue/README.md b/queue/README.md new file mode 100644 index 0000000..be3fbdd --- /dev/null +++ b/queue/README.md @@ -0,0 +1,24 @@ +# Queue scripts + +Basically these scripts are used for throwing commands in a queue and +then running them sequentially with a configurable about of time between +them. +This allows for just throwing things in the queue and forgetting about +them without having to manually run commands one after the other. + +## Usage +Configuring the paths is highly suggested. You can have everything +other than the queue\_add.sh script in a queue directory. +There's also the `CMD` variable useful if you're just running one +command with differing or even the same options. +The `TIME_BASE` and `TIME_RND` are useful to spacing the queue tasks +out if need be. + +## Example + ./queue_add.sh 'echo 1 >> log.txt' + ./queue_add.sh 'echo 2 >> log.txt' + ./queue_add.sh 'echo 3 >> log.txt' + ./queue_add.sh 'echo 4 >> log.txt' + ./queue_add.sh 'echo 5 >> log.txt' + sleep 1 # give it enough time to run the first job + tail -f log.txt # see the output -- cgit v1.2.3