[mrtg] Re: Re[2]: lib error

IT Andrew Bold it.andrew.bold at oldham.gov.uk
Thu Dec 2 09:55:35 MET 1999


Francisco Javier Alcala Soler wrote:

> Thanks to Don Buchholz, Neil Calvert and Daniel R . Kilbourne for their
> replies.
>
> Don's wrapper solves the problem. I was already using full paths for the
> cron job. My LD_LIBRARY_PATH is correctly exported in </etc/profile> and
> therefore, MRTG was working correctly from the command line.
>
> Why didn't it work from the cron job? Any ideas?
>
> Thanks, Curro.
>
>

/etc/profile is called when logging in to the system for users running sh
and (usually) ksh.  Because cron doesn't log in, it won't refer to
/etc/profile.

If you need to call /etc/profile (or any other setup script) into your
environment when running a command via cron, you can do something similar to
the following:

0 0,4,8,12,16,20 * * * /bin/sh -c  '. /path/to/my/setup/script;
/my/program/to/run'

Hope this helps,

--
Andrew Bold                   | mailto:it.andrew.bold at oldham.gov.uk
Support Systems Administrator | Telephone: 0161 911 3990
IT Corporate Services         | Fax:       0161 911 3998


--  
This message is confidential.  It may also be legally privileged.  It is intended solely for the stated addressee(s) and access to it by anyone else is unauthorised.  If you have received this message in error, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this message.  Such unauthorised use may be unlawful.  If you have received this message in error, please delete it immediately and advise us by return e-mail to the above address.

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list