ntfy.sh is a cool tool for sending push notifications for your mobile device. Here is a guide on how to send notificaitons for long running scripts you execute in your shell
curl https://ntfy.sh/YOUR_TOPIC
Let's simulate it. Here is what a notification might look like for a passing script
sleep 30 && curl -H prio:low -d "Laptop backup succeeded" ntfy.sh/YOUR_TOPIC || curl -H tags:warning -H prio:high -d "Laptop backup failed" ntfy.sh/jc13test
Here is what a notification might look like for a failing script
false && curl -H prio:low -d "Laptop backup succeeded" ntfy.sh/YOUR_TOPIC || curl -H tags:warning -H prio:high -d "Laptop backup failed" ntfy.sh/jc13test
Great, now just replace sleep 30
or false
with your script. e.g. test.py