View Single Post
Old Feb 21st, 2007, 2:33 PM   #1
mima
Newbie
 
Join Date: Feb 2007
Posts: 3
Rep Power: 0 mima is on a distinguished road
why isnt this working, from crontab?

Hello

I'm a newbie of bash programming and need some help with this.
The problem is that it workes if I run it from the shell but if I run it from crontab it doesnt then I get "command not found" when calling on an extern program even if the path to the extern program is defined in $HOME/.bash_profile


I have 2 bash files
1) a. bash where the logic is
2) b.bash where common functions are stored

in a.bash I include b.bash by doing

#!/bin/bash
#
# Description:
. /<dest_to_file>/b.bash


from a.bash I then call on some functions that are stored in b.bash...
lets now say I have called on a function that are stored in b.bash and from b.bash I call on an extern program "program_a" then I get error output "command not found" even if the path to "program_a" is defined in $HOME/.bash_profile. This occurs when I run the program from crontab but not when I run it manually from shell. (The cronjob is runned by same user as from shell)

I would really apprechiate if anyone could help me to explain why its not working?


/Regards /MiMa
mima is offline   Reply With Quote