Hi,
The users profile is never parsed when running a script from cron.
The easiest way (my opinion) to solve this: Put a snippet of code in the beginning of the script that is called.
Code:
# Needed for crontab, profile user not automatically parsed.
[[ "`/usr/bin/tty`" == "not a tty" ]] && . ~/.profile
The tty command tells which tty is connected, if none is (which is the case when running from cron) it will output the 'not a tty' message.
The above line will parse .profile when 'not a tty' is encountered.
Hope this helps.