which command run in cron returns nothing
- by Zárate
Hi there,
I've written a little utility in haXe + Neko that needs to execute some GIT commands. To avoid hardcoding the path to the GIT executable I'd like to use the which command to find out where it is. Everything works as expected when running manually from the console, but not when the the app runs on a cron job.
I'm aware of the restricted environment (here or here) when you run a script using cron, but still surprised this doesn't work:
/usr/bin/which git >> /home/user/git.txt
The text file is created but the content is empty. Again, when run from the console it works as expected.
Any ideas? I'm running OS X Leopard, if that helps.
Thanks : )
Juan