Tanney, Austin said on Wed, Nov 03, 2004 at 10:57:02AM -0000:
> 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?
>The .cshrc files et. al. don't get sourced before using cron jobs. You can set
environment in a cron job by setting it in the crontab, like:
Or in the line for the job you need it, like:
0 0 * * * PTAHOME=blah /some/where/blah
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!