Hi,
As far as I know cronjobs don't read .bashrc or .cshrc so you have to set the variables in the script that cron runs.
For bash "export VAR=VALUE"
for csh "setenv VAR=VALUE"
Greg
On Wed, Nov 03, 2004 at 10:57:02AM -0000, Tanney, Austin wrote:
> As if it wasnt stressful enough waiting on Ohio to be called, I'm having Linux problems too.
>> I'm trying to set up a cronjob which runs a .csh script at a given time each day. The script invokes a program called 'PTA'. I can get the script to start ok as a cronjob but it does not run to completion. At /var/spool/mail/root I receive a message telling me that the PTAHOME variable is not set.
>> The thing is that I HAVE set this variable in both the .bashrc and .cshrc files and if I run the script from the command line it executes perfectly with no mention of the PTAHOME variable. Has anyone got any suggestions as to what might be going wrong?
>>> Cheers
>> Austin
>>>>> This e-mail is from ArraDx Ltd
>> The e-mail and any files transmitted with it are confidential and privileged and intended solely for the use of the individual or entity to whom they are addressed.
>> Any unauthorised direct or indirect dissemination, distribution or copying of this message and any attachments is strictly prohibited.
>> If you have received the e-mail in error please notify helpdesk at arradx.com or telephone +44 28 38 363841 and delete the e-mail from your system.
>> E-mail and other communications sent to this company may be reviewed or read by persons other than the intended recipient.
>> Viruses : although we have taken steps to ensure that this e-mail and any attachments are free from any virus, you should, in keeping with good practice, ensure that they are actually virus free.
>> ArraDx Ltd. Registration Number NI 43067
> Registered Address : Almac House, 20 Seagoe Industrial Estate, Craigavon, BT63 5QD
>> --
> Irish Linux Users' Group
>http://www.linux.ie/mailman/listinfo/ilug/>
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!