Having problems running shell script from crontab

Kaya Saman kayasaman at gmail.com
Sat Jan 7 14:31:55 UTC 2012

On 01/07/2012 03:57 PM, RW wrote:
> On Sat, 07 Jan 2012 15:37:49 +0200
> Kaya Saman wrote:
> n terms of paths this is what I'm doing: I'm in a FreeBSD jail
>> logged in by - #jexec<jail>  tcsh
>> which gets me in as root. Crontab is being run as root so paths
>> should be the same no?
> PATH is set at the top of /etc/crontab
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

Ok, sorry for being slow but I still don't understand how the PATH 
variable is connected to restarting tomcat?

This is the default PATH in /etc/crontab: 

but where my script seems to not work well when run is at this point: 
/usr/local/etc/rc.d/tomcat6 restart

Does this mean that putting :/usr/local/etc to the PATH statement will 
enable crontab to understand the .../etc/rc.d/ script variables?

I think where I'm getting confused is that I'm using 'absolute' paths 
and my knowledge of the PATH is when one wants to run a command 
specifically from a shell; as in 'top'. so you wouldn't need to run 



More information about the freebsd-questions mailing list