Why crontab is not able to run some commands ?

Paul Schmehl pauls at utdallas.edu
Fri May 11 19:34:29 UTC 2007


--On Friday, May 11, 2007 21:53:24 +0300 Halid Faith <maslak at ihlas.net.tr> 
wrote:

>
> I have a script. As I am a root user,  I can run it without a problem. I
> added that script to crontab in order to run as automatic.
> I entered in /etc/crontab and put down as below;
> */20     *       *       *       *       root    /etc/scriptfile
>
Try running this from the commandline:

root /etc/scriptfile

Bet it doesn't work.  :-)

Then try running this in your cron job:
/bin/sh /etc/scriptfile

Bet it does work.  :-)

-- 
Paul Schmehl (pauls at utdallas.edu)
Senior Information Security Analyst
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/


More information about the freebsd-questions mailing list