How to pass variable to ftp script?

how can I use shell variable inside ftp script as in below:-
the case as below:-
I have folder names as (Sunday,Monday...etc) and inside these folders I am trying to get files where their names are "mf_us[mv]m_ssnc[0-9]*_mo0'HOUR''MIN'[0134][05]".

where
HOUR= hour as in `date "+%H"` - 2
MIN= either 00,15,30,45

now the problem is how to get HOUR and MIN depending on the command date "+%[HM]" executed now, and then substitute MIN from the command after some calculations then put it in the code below to dynamically drag the files.

files are generated every 15 min and looked like below:

mf_us[mv]m_ssnc[0-9]*_mo01800
mf_us[mv]m_ssnc[0-9]*_mo01815
mf_us[mv]m_ssnc[0-9]*_mo01830
mf_us[mv]m_ssnc[0-9]*_mo01845
ftp -i -n <<EOF
open 192.168.xx.xxx
user user_name password
hash
prompt
bin

let "s=`date '+%H'` - 2"  # doesn't work ???!!! :(:(

cd /home/dir/`date '+%A'`/Hour`date '+%H'` # working fine.:b:
lcd /home/dir/in local/
mget mf_us[mv]m_ssnc[0-9]*_mo0"$s"[0134][05] #doesn't work :(:(:(
bye
EOF

thanks in advance.

---------- Post updated at 21:07 ---------- Previous update was at 20:09 ----------

thanks guys I just figure it out.

cat ftp_run:-

if [[ `date '+%M'`  -lt 15 ]]
then
sub="00"
elif [[ `date '+%M'` -ge 15 && `date '+%M'` -lt 30 ]]
then
sub="15"
elif [[ `date '+%M'` -ge 30 && `date '+%M'` -lt 45 ]]
then
sub="30"
elif [[ `date '+%M'` -ge 45 && `date '+%M'` -lt 60 ]]
then
sub="45"
else
echo "something wrong"
fi

cat << EOF

open 192.168.7.215
user user_name pass
hash
prompt
bin
cd /home/rdir/`date '+%A'`/Hour`date '+%H'`
lcd /dir


mget mf_us[mv]m_ssnc[0-9]*_mo0$(( `date '+%H'` - 2 ))$sub
bye

EOF

./ftp_run > ftp_script

then executing ftp script in cron job.

Please explain it better ,

If you want to pass the variable value use command line arguments ,
If you want to use the shell variables in a cron then it is not possible , since cron has no
interface and you cannot get any shell variable values inside it,
I hope that you aware of giving values inside the cron by put the values in the next line.

I guess that you have some other problems too , dont mix up ask one by one there by we can avoid confusions

who said that I will sub. the variable in cronjob? you miss understood

firstly I wrote a script (run file) that will build the ftp commands.
then I put this RUN file in the cronjob to be executed.

after the RUN finish executing the ftp file is ready.
I then will made the ftp_script file executable .

At last will made a cronjob to ftp_script file to execute the ftp commands.

Finish
Job Done.

by the way it works greatly.
:D:D:D