From owner-freebsd-questions@FreeBSD.ORG Sat Jan 7 14:31:55 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 79837106566B for ; Sat, 7 Jan 2012 14:31:55 +0000 (UTC) (envelope-from kayasaman@gmail.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 04C008FC1E for ; Sat, 7 Jan 2012 14:31:54 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so308088wgb.31 for ; Sat, 07 Jan 2012 06:31:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=0c1hEu8VfTZY28HlM+YvQY23THgBk028t587jnq6kbI=; b=QsWWsVTv1+/klnyjg9k1EtgWxCDdlBwVf1QHk8gnMVVzedye5QCOrhDcgiY2dT39oW 9wC0AO9RdWbU+YfJh0unYhlKn1Ef/ico7QHMxxFAc0q7tOIvW2vlnEPdP1l4P8/QjCil kbDJoa7HjZ0X6Mn7wUekz3qTMRo5ZMR5Pzo0Y= Received: by 10.180.88.97 with SMTP id bf1mr13416066wib.10.1325946713860; Sat, 07 Jan 2012 06:31:53 -0800 (PST) Received: from Hp2230s.localhost (81-178-2-118.dsl.pipex.com. [81.178.2.118]) by mx.google.com with ESMTPS id f36sm28708183wbo.10.2012.01.07.06.31.52 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 06:31:52 -0800 (PST) Message-ID: <4F08574C.5020001@gmail.com> Date: Sat, 07 Jan 2012 16:31:40 +0200 From: Kaya Saman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4F0838DF.40006@gmail.com> <20120107132234.31d04a1c@gumby.homeunix.com> <4F084AAD.3050301@gmail.com> <20120107135743.6aa5a6bd@gumby.homeunix.com> In-Reply-To: <20120107135743.6aa5a6bd@gumby.homeunix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 14:31:55 -0000 On 01/07/2012 03:57 PM, RW wrote: > On Sat, 07 Jan 2012 15:37:49 +0200 > Kaya Saman wrote: > > n terms of paths this is what I'm doing: I'm in a FreeBSD jail >> logged in by - #jexec tcsh >> >> which gets me in as root. Crontab is being run as root so paths >> should be the same no? > PATH is set at the top of /etc/crontab > _______________________________________________ > 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" Ok, sorry for being slow but I still don't understand how the PATH variable is connected to restarting tomcat? This is the default PATH in /etc/crontab: PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin but where my script seems to not work well when run is at this point: /usr/local/etc/rc.d/tomcat6 restart Does this mean that putting :/usr/local/etc to the PATH statement will enable crontab to understand the .../etc/rc.d/ script variables? I think where I'm getting confused is that I'm using 'absolute' paths and my knowledge of the PATH is when one wants to run a command specifically from a shell; as in 'top'. so you wouldn't need to run /usr/bin/top. Regards, Kaya