I have a case where I have to process thousands of files.
I have used the parallels program to run in batches but I don’t want to monitor and see when the process will be finished.
Here is what I used to see if there are some processes named “convert”
#!/bin/bash
number=`ps aux | grep convert | wc -l`
echo $number
if [ "$number" -eq "1" ]; then
telegram-send "finished converting"
sleep 60
fi
Then run this in some “screen”
watch -n 60 ./notify.sh
That way you will get a message on telegram every 60 seconds.
telegram-send can be installed with pip install telegram-send