This is going to be due the difference in your environment. Cron has a pretty empty environment by default.
Best thing to do is type "set" on the command line and add "set" to the script and compare the two. There will be one or more values missing from the cron environment which will need adding in the script (export xxx=yyy)