Added push functionality Gotify CLI for longer runs.

master
Taha Ahmed 4 years ago
parent b000f1b489
commit 511fd8cad3

@ -371,6 +371,14 @@ cetcest=$(date +%Z)
endtime=$(date +%s)
runtime=$(( $endtime - $starttime ))
# send push message via Gotify CLI
# if runtime is longer than X minutes (suitable limit perhaps 3 min)
if (( $runtime > 180 )); then
# cwd is the current directory (basename)
cwd=$(basename $PWD)
gotify push --quiet --title "$cwd" --priority 5 "chertex.sh $@ \nCompleted in $runtime s"
fi
echo "-------------------------------------"
# the padding for runtime makes the formatting work
# three digits for seconds is enough for just above 15 minutes

Loading…
Cancel
Save