From owner-freebsd-questions@FreeBSD.ORG Wed Oct 4 04:39:52 2006 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 682ED16A412 for ; Wed, 4 Oct 2006 04:39:52 +0000 (UTC) (envelope-from atom.powers@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7CC143D46 for ; Wed, 4 Oct 2006 04:39:51 +0000 (GMT) (envelope-from atom.powers@gmail.com) Received: by nf-out-0910.google.com with SMTP id n29so448757nfc for ; Tue, 03 Oct 2006 21:39:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=q9sde3+Q7CuoPOEBWIxEGCGXM+/cacAnDSR/LvJFAI+ex4s4hAmq8c7RlhvRMhV4k4tpdGJK28b4vl3tgI3xh+aRQ2zBPc0oqr8sd89zodpDruWLj3a6Uw3Now/pmTOXXr6fSxgMPtRr9IJ2hicNYXih+AxPWrgQENzwfeHnRPs= Received: by 10.49.43.2 with SMTP id v2mr1818781nfj; Tue, 03 Oct 2006 21:39:50 -0700 (PDT) Received: by 10.49.63.18 with HTTP; Tue, 3 Oct 2006 21:39:50 -0700 (PDT) Message-ID: Date: Tue, 3 Oct 2006 21:39:50 -0700 From: "Atom Powers" To: "Free BSD Questions list" In-Reply-To: <20061004000523.GA5229@teddy.fas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061004000523.GA5229@teddy.fas.com> Subject: Re: Strange cron behavior 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: Wed, 04 Oct 2006 04:39:52 -0000 On 10/3/06, stan wrote: > I'm having a hard time getting cron to run a task. I've run crontab -e > (as root), and added the following line: > > 12 * * * * /usr/local/bin/mirror_ubuntu > > This script runs from teh command line. Now I've seen plenty of > strange beahviour because of the limited environment cron tasks > get, but a basic "echo "test" >> /tmp/stan isn't even creating > the file. > > Sugestions? > Even your basic script is making assumptions about the environment. When writing cron scripts always use full-path to your executables and be very aware of when you are globbing. If I recall, cron won't allow globbing (the '*' and '?' characters in paths) in commands unless explicitly enabled, and the only path you get is that defined in your crontab. -- -- Perfection is just a word I use occasionally with mustard. --Atom Powers--