Created
August 31, 2018 14:38
-
-
Save jimlinntu/c3f85aeabf14fbc772b8206525a91d32 to your computer and use it in GitHub Desktop.
GCPHelper
This file contains 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
while : | |
do | |
echo "Sleep awhile" | |
sleep 10m | |
# Check if there is python process | |
if [[ $(ps -ef | grep -c 'python train.py') == 1 ]]; then | |
sudo shutdown now | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment