Created
February 7, 2011 14:48
-
-
Save dsingleton/814462 to your computer and use it in GitHub Desktop.
A simple shell script to repeatedly run a PHP script until it returns a successful code
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
#!/bin/bash | |
RES=256 | |
while [ $RES != 0 ] | |
do | |
if [ $RES != 256 ] | |
then | |
sleep 2 | |
fi | |
/usr/bin/env php $* | |
RES=$? | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment