View Single Post
  #5  
Old 28th September 2009, 15:09
lchvdlch lchvdlch is offline
Junior Member
 
Join Date: Sep 2009
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default Environment under Cron

As a general rule, in linux, you can "see" the environment of a running process by knowing it's PID:

Code:
strings /proc/PID/env
On the other hand, when you issue no PATH, all programs (CRON included), run by default with a simple path:

Code:
PATH=/bin:/usr/bin
So that's why you couldn't run programs under /usr/sbin.

You can modify the PATH in your cron, so it suits your script needs.
Reply With Quote