Expect Script not running from cron. Full Paths used

My cron file. Copied $PATH

# Minute   Hour   Day of Month       Month          Day of Week        Command
SHELL=/bin/ksh
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/perl/lib:/perl/lib/lib/perl5:/perl/scripts:.:/perl/lib/local:/home/popeye:/temp
0 12 * * * /home/popeye/xferResult &

The script

#!/usr/bin/expect 
spawn ftp -i 2.22.221.211
expect ":"
send "popeye\n"
expect ":"
sleep 1
send "thesailorman\n"
expect ">"
send "cd filestore\r"
expect ">"
send "put /home/popeye/Resulta\r"
#send "mput /home/popeye/Result*\r"
expect ">"
sleep 2 
send "bye\r"
close

The error

The files are there. Any help would be very appreciated.

Thanks Regards
POP

---------- Post updated 11-06-13 at 09:51 AM ---------- Previous update was 11-05-13 at 01:53 PM ----------

I solved the problem. I was wondering how to close threads. I like to keep a tidy ship.

If you solved the problem, it would be nice NOT to ask to close the thread but to explain what was the issue and the remedy applied...

To solve the problem

Use

expect ">"
send "lcd /home/popeye\r"
expect ">"
send "mput /home/popeye/Result*\r"
expect ">"

:b::slight_smile: