[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

crontab job default environment on solaris and who to change it



 
    
crontab job default environment on solaris and who to change it
---------------------------------------------------------------

According to manual of crontab:

     The shell is invoked from your $HOME directory with an  arg0
     of sh. Users who desire to have their .profile executed must
     explicitly do so  in  the  crontab  file.  cron  supplies  a
     default environment for every shell, defining HOME, LOGNAME,
     SHELL(=/bin/sh), TZ, and PATH. The  default  PATH  for  user
     cron  jobs  is  /usr/bin;  while  root  cron jobs default to
     /usr/sbin:/usr/bin.  The  default  PATH  can   be   set   in
     /etc/default/cron; see cron(1M).

So the output of default environment variables are:
 
HOME=/export/home/siwc
LOGNAME=siwc
PATH=/usr/bin:
SHELL=/usr/bin/sh
TZ=Australia/Victoria

in crontab, if you want job to pick up the new settings, set:

## Feed scripts
00 8-20 * * * LD_LIBRARY_PATH=/usr/local/lib:/servers/web/openssl-0.9.7/lib:/servers/sun/directory52/lib /servers/web/directory/feeds/synchronise.pl

BTW, solaris crontab doesn't like blank lines in it.


Google