I have a script of the following format:
#!/bin/bash
cd /abc/def/user1/test
export NIMBUS_ENV_FILE=/abc/def/user1/test/nimbus_env
main/vdnet -c yaml/config.yaml -t ABC...*
my script executes perfectly when run from the shell.I want to execute this script daily and so i have set a cron job for the same by editing crontab -e as :
PATH=/usr/bin:/usr/sbin:.
00 12 * * * /home/test.sh > /home/testCronLog.log 2>&1
Hoever, the cron job is run but it does not run the script as expected and gives following errors:
main/vdnet: line 2: readlink: command not found
dirname: missing operand
Try 'dirname --help' for more information.
main/vdnet: line 3: /../main/environment: No such file or directory
main/vdnet: line 8: /../scripts/nimbus/setup: No such file or directory
main/vdnet: line 14: /../main/vdNet.pl: No such file or directory
I do not get these errors when I manually execute the script and am not able to figure out whats wrong.The owner of the script is same as the crontab user. Please Help!!!
main/vdnetin your script - Hackaholic