nadir at ultel.net
Tue Feb 2 11:54:12 UTC 2010
I have interesting situation with cron.
I created a
simple script for process monitoring:
processname=`/bin/ps aux | /usr/bin/grep -v grep |
/usr/bin/grep -c 'maintenance_jobs.php'`
if [ $processname -le "0" ];
echo "`/bin/date` > JOB WAS DEAD. RESTARTED!" | mail -s "ATTENTION"
my at email.net;
/usr/local/www/web/bin/maintenance_jobs.php then" is not interpretated by
shell when i run this script from cron.
I tried it on sh and bash. Result
But this script worked on pre 8 versions.
More information about the freebsd-questions