From owner-freebsd-questions@FreeBSD.ORG Thu Feb 4 09:25:55 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61C311065676 for ; Thu, 4 Feb 2010 09:25:55 +0000 (UTC) (envelope-from kraduk@googlemail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id E82BA8FC26 for ; Thu, 4 Feb 2010 09:25:54 +0000 (UTC) Received: by fxm24 with SMTP id 24so518283fxm.3 for ; Thu, 04 Feb 2010 01:25:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=kA+TBVEPnq5WPzv9w26hSckrcTLb8C7PGMysqlXdgoc=; b=ObTe5SaryzNGpZCGROpo75AVtw7oVaoCgdkE+C4hbOg+SUIW6bEPEAfhU8qIXIVhsR M/263Wp0NcvuDLJbG2D6no5lLz69ke6LQxzSNWbn0wDQVYSL5slotwR+nsBfvevumj8k TFWXZJAer6KbZO9iBFw++70BmKTg21cGHfd1o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DCAY4KUfqpnK1lm1FJ9FBgMxudRvN7m8YW3Tei540NRQ6seoiS9Cn14N1HDquBXc1X O8rtg1MvYNxZgb2UkpyD8XrfMhh1Gx6WXR4Ryd0w61nfQBUkLmH+yQbq4Aqe1tAaooPk qCp59lmaqma67Rg5C5ckjqX5wSdmeOrz1N9zY= MIME-Version: 1.0 Received: by 10.102.217.14 with SMTP id p14mr441699mug.116.1265275553671; Thu, 04 Feb 2010 01:25:53 -0800 (PST) In-Reply-To: <44bpg6qpzd.fsf@be-well.ilk.org> References: <85d1584578da54a48257f998b89fd337@localhost> <44bpg6qpzd.fsf@be-well.ilk.org> Date: Thu, 4 Feb 2010 09:25:53 +0000 Message-ID: From: krad To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Nadir Aliyev Subject: Re: crontab X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 09:25:55 -0000 On 3 February 2010 15:49, Lowell Gilbert < freebsd-questions-local@be-well.ilk.org> wrote: > Nadir Aliyev 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/ > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > double check everything in your environment and make sure its there in the script.