There is difference when you run your script from cron and from terminal,cron does not get env variables ,so either you can set it at thje start of cron like
or you can use full path
And one more imp thing to note is always redirect output to file while running through cron