You need to setup a crontab that'll call a check script...
0,15,30,45 * * * * /home/username/name_of_chk_file >/dev/null 2>&1
#!/bin/sh
#Crontabscript written for BeBot
botname="NameOfBot"
pattern="php start.php"
botdir="/home/username/botDir"
command="/usr/bin/screen -dmS bot /usr/bin/php start.php"
if ps x | grep "$pattern" | grep -v grep
then
echo $botname "is still running."
exit 0
else
echo "Starting "$botname
cd $botdir
$command
exit 1
fi
You just have to edit the paths and possible filenames you run (on a multi-bot system renaming start.php to botname.php would make sense, but then you have to change start.php in the script to botname.php instead.
This is what I use for myself, if you can't get it working I will not help you! Use it at your own risk. There's also other posts about this if you do a search for "crontab".