FTP Cron issues

I am on AS3 Update 4 Linux
and am having an issue with an automated ftp script, I tried using the fd/sub proc method and that did not seem to work either. I normally use the following method to perform my ftp's but for some reason it works if I launch the script at the command line but in Cron it fails. Any help or suggestions would be appreciated.

<Begin Code>
#!/bin/bash
some othe code

echo "open IP ADDR" > $HOME/.ftpcpu
echo "user <user> <password>" >> $HOME/.ftpcpu
echo "binary" >> $HOME/.ftpcpu
echo " cd <Directory>" >> $HOME/.ftpcpu
echo "put $filename" >> $HOME/.ftpcpu
/usr/bin/ftp -n < $HOME/.ftpcpu
rm $HOME/.ftpcpu
<End Code>

The only thing diffrent on this system than the others that are in production is this ftp does not have a batch mode (-b) option.

Question #1 - is $HOME defined? The mian reason cron scripts fail is that they don't normally source /etc/profile and often do not have environment variables you have otherwise.

Yes $HOME is defined, The error is with ftp wanting me to input username and Password. I turned writing stdout and stderr to dev/null off so I could see the error.

I do not get this error when I execute the script at command line

On the destination Server ,
if u make entry in the .rlogin file for corresponding Source Ipaddress and username .

<Source IP address> <Username>

when u do ftp from
<Source IP address> using <Username>
It will not ask password .
u can execute ur batch ftp programs .

Normally in Windows it can be done by ftp -s:file
we can write username,passwd in file and execute the batch ftps.
but whereas in Unix .rlogin concept is used.

In previous post ,I have written that make entry in .rlogin ,it is .rhosts file.
If U make entry in .rhosts file with IP address and username.
Remote Commands are allowed from <IPADDRESS> for <Usename> without passwords