Skip to content

Instantly share code, notes, and snippets.

@erev0s
Last active December 10, 2018 21:14
Show Gist options
  • Save erev0s/36602668a1b4ee404bdb69096d7c571b to your computer and use it in GitHub Desktop.
Save erev0s/36602668a1b4ee404bdb69096d7c571b to your computer and use it in GitHub Desktop.
small check if some process is done, to send you email
#!/bin/bash
#*/5 * * * * /root/isitdone.sh
ps -ef | grep -v grep | grep "java"
if [ $? -ne 0 ]; then
echo "Process done" | mail -s "Process done" example@mail.com
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment