Last active
December 10, 2018 21:14
-
-
Save erev0s/36602668a1b4ee404bdb69096d7c571b to your computer and use it in GitHub Desktop.
small check if some process is done, to send you email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#*/5 * * * * /root/isitdone.sh | |
ps -ef | grep -v grep | grep "java" | |
if [ $? -ne 0 ]; then | |
echo "Process done" | mail -s "Process done" [email protected] | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment