From owner-freebsd-questions@FreeBSD.ORG Fri Sep 12 06:14:45 2008 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 620631065676 for ; Fri, 12 Sep 2008 06:14:45 +0000 (UTC) (envelope-from cyberleo@cyberleo.net) Received: from mtumishi.cyberleo.net (mtumishi.cyberleo.net [69.72.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 3371B8FC20 for ; Fri, 12 Sep 2008 06:14:44 +0000 (UTC) (envelope-from cyberleo@cyberleo.net) Received: from [172.16.44.14] (adsl-75-4-161-142.dsl.emhril.sbcglobal.net [75.4.161.142]) by mtumishi.cyberleo.net (Postfix) with ESMTPSA id 923F411748; Fri, 12 Sep 2008 02:14:43 -0400 (EDT) Message-ID: <48CA08CC.7070407@cyberleo.net> Date: Fri, 12 Sep 2008 01:14:36 -0500 From: CyberLeo Kitsana User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: Darrell Betts References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: setup cronjob 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: Fri, 12 Sep 2008 06:14:45 -0000 Darrell Betts wrote: > I have wrote a small script put it in my home directory. I am trying to > setup a cronjob to run it every six hours. When it runs the job I > receive the error message " /usr/home/test/cronjobs/test.sh: not found" > I have tripe checked the file permissions and they appear correct so I > am stumped as to why this won't run? Any ideas? Make sure that the shebang at the top of the script (#!/bin/sh or similar) points to a valid shell, and that it uses unix-style end of lines. If a control character or linefeed gets in there somewhere, the kernel won't be able to find the proper interpreter to run the script, hence the "test.sh: '' not found." -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net Furry Peace! - http://wwww.fur.com/peace/