Executing a script from CRON behaves differently than terminal

Hi have a script which transferers from Microsoft server to Linux box.

The scripts(ksh) is on Linux box.

If I run script from terminal, it transfers files to directory. Where as If
I run script from CRON. It does not.

Here is the log of both:

Terminal execution log:
----------------------

Connected to 204.138.63.246.
220 Microsoft FTP Service
500 'AUTH GSSAPI': command not understood
500 'AUTH KERBEROS_V4': command not understood
KERBEROS_V4 rejected as an authentication type
331 Password required for progen.
230 User progen logged in.
?Invalid command
200 Type set to I.
local: 8581407_HO_20100902.pdf remote: 8581407_HO_20100902.pdf
227 Entering Passive Mode (204,138,63,246,12,67).
125 Data connection already open; Transfer starting.
226 Transfer complete.
414442 bytes received in 0.036 seconds (1.1e+04 Kbytes/s)

CRON execution log:
--------------------

Connected to 204.138.63.246 (204.138.63.246).
220 Microsoft FTP Service
331 Password required for progen.
230 User progen logged in.
?Invalid command
200 Type set to I.
Local: 8581407_HO_20100902.pdf remote: 8581407_HO_20100902.pdf
227 Entering Passive Mode (204,138,63,246,12,33).
125 Data connection already open; Transfer starting.
226 Transfer complete.
426891 bytes received in 0.0371 secs (1.1e+04 Kbytes/sec)
221

I don't see any files in the directoy if I run script from CRON.

Thanks in advance.

If this is a root cron the files will probably be found in the home directory for the root account unless your script contains a suitable "cd" or your ftp commands contain a suitable "lcd".

Please post the current version of your script.
I think we last saw a version in a previous post.
http://www.unix.com/shell-programming-scripting/142307-ftp-stores-unwanted-chars-output-file.html

Thanks!!

The problem has been resolved.

The problem was with Oracle Environment variables. My scripts is calling
Oracle stored procedures and functions. If script executed from CRON, the
Oracle related environment variable must be declared otherwise Oracle functions/procedures won't be executed.

I am amazed, log did not tell me the exact problem.

Thanks again!!