From owner-freebsd-questions@FreeBSD.ORG Fri Sep 9 13:33:08 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C90F16A41F for ; Fri, 9 Sep 2005 13:33:08 +0000 (GMT) (envelope-from jdyke@azimainc.com) Received: from extgw01.msys.intellispace.net (extgw01.msys.intellispace.net [160.79.150.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EBD843D45 for ; Fri, 9 Sep 2005 13:33:08 +0000 (GMT) (envelope-from jdyke@azimainc.com) Received: from malone.intellispace.net (malone.intellispace.net [160.79.145.141]) by extgw01.msys.intellispace.net (Postfix) with ESMTP id 5CC7CC5345; Fri, 9 Sep 2005 09:32:16 -0400 (EDT) Received: from [192.168.2.45] (66.9.108.98) by malone.intellispace.net (5.1.053) id 431BB317002251AA; Fri, 9 Sep 2005 09:28:42 -0400 Message-ID: <43218E93.9060409@azimainc.com> Date: Fri, 09 Sep 2005 13:30:59 +0000 From: jdyke Organization: Azima Inc. User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: webmaster@freshtraxxx.com References: <432186BD.1030702@freshtraxxx.com> In-Reply-To: <432186BD.1030702@freshtraxxx.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Help running shell script from cron X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jdyke@azimapower.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2005 13:33:08 -0000 there is a possibility that the 'not found' is coming from your call to php and not that it can't find test.sh either comment out that php line, or use /full/path/to/php /home/a_user/cron/test.php HTH Jeff Sandy Knight wrote: > I am having trouble configuring my shell scripts to run under cron (user > level, not root). I have set up a test.sh script which sends me an > email, it works fine from the command line (ssh). the script is as follows: > > #!/bin/sh > echo "helloworld" | mail -s "helloworld" user@domain.com > php /home/a_user/cron/test.php > > > As you can see I am also trying to get a php script to run (this is my > ultimate aim). > > My crontab is as follows: > > # /home/a_user > # > SHELL=/bin/sh > PATH=/home/a_user/cron > HOME=/home/a_user > # > # > #minute hour mday month wday command > # > # > */5 * * * * /home/a_user/cron/test.sh > > > I have done the following: > > $ pwd > > /home/a_user > > $ crontab cron/myCronTab > > $ crontab -l > > {output - see above} > > > Crontab is trying to run my script as I receive an email every 5 minutes > saying: > > /home/a_user/cron/test.sh: not found > > > The permissions for the scripts are: > > $ ls -lt cron/ > > -rw-r--r-- 1 a_user vusers 322 Sep 9 12:27 myCronTab > -rwxr-xr-x 1 a_user vusers 107 Sep 9 12:16 test.sh > -rwxr-xr-x 1 a_user vusers 99 Sep 4 17:58 test.php > > Thank you in advance, > > Sandy > _______________________________________________ > 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" >