Created
March 7, 2016 00:33
-
-
Save rudiedirkx/b4e2d763cc6447b4f80a to your computer and use it in GitHub Desktop.
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
script=$1 | |
echo $script | |
while [ true ]; do | |
DT=$(date +"%Y%m%d_%H%M%S") | |
FILE="/tmp/keepalive-$DT.log" | |
echo $FILE | |
echo | |
touch $FILE | |
>$FILE | |
php $script 2>&1 | tee $FILE | |
echo | |
echo "SENDING MAIL" | |
cat $FILE | mail -E -s "br2 keepalive/queue - v2" rudiedirkx@gmail.com | |
echo | |
echo | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment