I have an issue whereby the below line of code executes perfectly via the putty command line but produces the following error when executed via crontab;
I've been around the houses looking for a solution to this, is it TWB_ROOT, PATH, some other enviroment var, I don't know!
I'm using "Teradata Parallel Transporter Version 15.10.00.04 64-Bit"
on "Linux <SERVER> 2.6.32-573.22.1.el6.x86_64 #1 SMP Thu Mar 17 03:23:39 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux"
The below code works perfectly via command line but fails with "Error launching tbuildexe: No such file or directory (2)" when executed via crontab.
/opt/teradata/client/15.10/bin/tbuild -f /PnI/stable/PAC_REQUESTS/tpt/CREATED_PAC_REQUESTS.tpt -v /home/joxley/.td_user_data -u "DataFile = '/PnI/stable/PAC_REQUESTS/data/FINMIS_DAILY_CREATED_PAC_201704_20170523090502.dat', DirectoryPath = '/PnI/stable/PAC_REQUESTS/data'"
Solved! Go to Solution.
This is a common issue for people not familiar with cron. The shell spawned by cron does not automatically execute the user's profile script(s), the way a normal login does.
Do a Google search for cron profile and you will find a number of ways to address the situation.
Thanks, I've tried a load of combinations of things to resolve this with no luck.
Is there any way of finding what file or directory the error is refering to?
All my code has full file paths defined so does that mean there's an issue with the TPT install?
Also, I've seen in other posts that the contents of $PATH have been asked for.
Which TPT related paths should be in $PATH please?