I\'m trying to set up a cron job as a sort of watchdog for a daemon that I\'ve created. If the daemon errors out and fails, I want the cron job to periodically restart it...
You can also do it as a one-liner directly in your crontab:
* * * * * [ `ps -ef|grep -v grep|grep ` -eq 0 ] &&