Date: Tue, 3 Oct 2006 21:39:50 -0700 From: "Atom Powers" <atom.powers@gmail.com> To: "Free BSD Questions list" <freebsd-questions@freebsd.org> Subject: Re: Strange cron behavior Message-ID: <df9ac37c0610032139h921a290weac7164738f199f1@mail.gmail.com> In-Reply-To: <20061004000523.GA5229@teddy.fas.com> References: <20061004000523.GA5229@teddy.fas.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/3/06, stan <stanb@panix.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?df9ac37c0610032139h921a290weac7164738f199f1>