I am facing a weired problem. I wrote a bash script to get the status of an app. Script is running fine when i am executing it from shell but when I am trying to execute the same script from crontab its not working. Not sure what is happening here...
Both manual and cron are running from root account.
Answer
This is generally because cron does not enable the PATH the same way as the shell does. Try typing "echo $PATH" at a prompt. Take the resulting PATH string and add it to the top of crontab file as PATH= That will probably fix it.
Mark
No comments:
Post a Comment