Skip to content

Instantly share code, notes, and snippets.

@dsingleton
Created February 7, 2011 14:48
Show Gist options
  • Save dsingleton/814462 to your computer and use it in GitHub Desktop.
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
#!/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