If I understand you correctly, your script works if you call it on the command line, but not as a cron job. That is usually because cron has a different environment, i.e. a different current working directory, a different PATH ...
For example it might have problems finding executables the script is depending on
In reply to Re: Extract data based on dates and place in new file
by jethro
in thread Extract data based on dates and place in new file
by dtbach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |