Skip to content

Instantly share code, notes, and snippets.

@rudiedirkx
Created March 7, 2016 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rudiedirkx/b4e2d763cc6447b4f80a to your computer and use it in GitHub Desktop.
Save rudiedirkx/b4e2d763cc6447b4f80a to your computer and use it in GitHub Desktop.
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