Date: Fri, 11 May 2007 20:10:54 +0000 (UTC) From: Duane Hill <d.hill@yournetplus.com> To: freebsd-questions@freebsd.org Subject: Re: Why crontab is not able to run some commands ? Message-ID: <20070511200851.E20501@duane.dbq.yournetplus.com> In-Reply-To: <332E8FBDDDFF59A09A61B060@utd59514.utdallas.edu> References: <002001c793fd$a789bfa0$dc96eed5@ihlasnetym> <7B18DD5BC0866A3F9B9EC7A3@utd59514.utdallas.edu> <20070511194316.N20096@duane.dbq.yournetplus.com> <332E8FBDDDFF59A09A61B060@utd59514.utdallas.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 11 May 2007, Paul Schmehl wrote: > --On Friday, May 11, 2007 19:45:22 +0000 Duane Hill <d.hill@yournetplus.com> > wrote: > >> On Fri, 11 May 2007, Paul Schmehl wrote: >> >>> >>> Then try running this in your cron job: >>> /bin/sh /etc/scriptfile >>> >>> Bet it does work. :-) >> >> Yes, but if the OP has: >> >> # !/bin/sh >> >> as the first line, the file owned by root and the executable flag for >> user set, shouldn't it execute from cron as just: >> >> /etc/scriptfile >> >> ?? >> > Yes, but I always like cron jobs to specifically call absolute path to the > binary of choice. That way someone couldn't substitute a different binary by > altering the path and force a cron job to do something unexpected. True. Thanks for the tip.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070511200851.E20501>