Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Feb 2010 10:49:10 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Nadir Aliyev <nadir@ultel.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: crontab
Message-ID:  <44bpg6qpzd.fsf@be-well.ilk.org>
In-Reply-To: <85d1584578da54a48257f998b89fd337@localhost> (Nadir Aliyev's message of "Tue, 02 Feb 2010 12:48:40 %2B0400")
References:  <85d1584578da54a48257f998b89fd337@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
Nadir Aliyev <nadir@ultel.net> writes:

> Hello friends. 
>
> I have interesting situation with cron. 
>
> I created a
> simple script for process monitoring:
>
> #!/usr/local/bin/bash
> processname=`/bin/ps aux | /usr/bin/grep -v grep |
> /usr/bin/grep -c 'maintenance_jobs.php'`
> if [ $processname -le "0" ];
> then
> echo "`/bin/date` > JOB WAS DEAD. RESTARTED!" | mail -s "ATTENTION"
> my@email.net;
> /usr/local/bin/php
> /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
> is same.
> But this script worked on pre 8 versions.

The script got wrapped and apparently cut off.  

I can't understand it, and probably nobody else could either.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
		http://be-well.ilk.org/~lowell/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44bpg6qpzd.fsf>