From owner-freebsd-questions@FreeBSD.ORG Sat Jan 7 13:22:40 2012 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 07C96106564A for ; Sat, 7 Jan 2012 13:22:40 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6F0438FC0A for ; Sat, 7 Jan 2012 13:22:39 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so273856wgb.31 for ; Sat, 07 Jan 2012 05:22:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=ApbmeQNNiI0ZT0B6QEcE91CfWAtUh8hQZclOSv3uqqQ=; b=EeON1cX3gU059cqMzRmY4dJb/Xsv5PTGrs3wZEDTIq3FGZDrDeEseqkj71FT9UTBzc EcYZtu/S/JRRH6U6y+Mzv3v1a6YYpWGXJ4oOortQXbWYU6CTlc0U6XBaBYltDSext6Oq 1vRN22erCDvDCLdF6H19INLbKSmY0melAcTuc= Received: by 10.180.81.72 with SMTP id y8mr17541410wix.14.1325942558387; Sat, 07 Jan 2012 05:22:38 -0800 (PST) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id ba4sm55059546wib.5.2012.01.07.05.22.36 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 05:22:37 -0800 (PST) Date: Sat, 7 Jan 2012 13:22:34 +0000 From: RW To: freebsd-questions@freebsd.org Message-ID: <20120107132234.31d04a1c@gumby.homeunix.com> In-Reply-To: <4F0838DF.40006@gmail.com> References: <4F0838DF.40006@gmail.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Having problems running shell script from 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: Sat, 07 Jan 2012 13:22:40 -0000 On Sat, 07 Jan 2012 14:21:51 +0200 Kaya Saman wrote: > The strange thing is that if I run this script manually > /root/java_restart/java_restart.sh it works fine and does what it's > supposed to do. The commonest reason for scripts that that work from a terminal failing under cron is that the environment isn't set-up correctly. Usually it's PATH that's missing or incomplete.