Elegant way of controlling your program is by creating script with PID-file mechanics, that will save program's PID to file, and check with it if process is still running:
#!/bin/bash
PID_FILE=/var/run/rerun.pid # need root permission to store in this directory
EXEC=/usr/bin/gedit # replace it with actual executable
function run() {
# execute the program
$EXEC &
# save its PID
echo $! > $PID_FILE
}
if [ -e $PID_FILE ]; then
# check if program is still running
pid=$(<$PID_FILE)
# find the proper process
ps --pid $pid|grep -q `basename $EXEC`
if [ $? != 0 ]; then
# not found - rerun
run
fi
else
# no PID file - just execute
run
fi
Now run the script periodically (eg. in crontab).