My thread is set to an ‘Upoc’ and I’m using advance scheduling to execute the script at a particular time. Again, it starts to execute but then stops. Any ideas?
Here’s part of the script.
# create expect script
set es [open $esn w]
puts $es “spawn sftp $user@$host”
puts $es “expect {”
puts -nonewline $es {”password:” }
puts $es “{send “$password\n”}”
puts $es {”Connection closed” return}
puts $es “}”
puts $es {expect “sftp>”}
puts $es “send “cd $remoteFile\n””
puts $es {expect “sftp>”}
puts $es “send “ls \n””
puts $es “expect {”
puts -nonewline
puts $es {-re “sftp > *.pdf”}
puts $es “}”
puts $es “set out $expect_out(buffer)”
puts $es “foreach file [split $out \r\n] {”
#puts $es ” send_user “DEBUG $file”n”
puts $es “send “get $file /opt/quovadx/qdx5.7/integrator/cerner_cert/data/integrity/notes\n””
puts $es “send “rm $file\n””
puts $es “}”
puts $es {expect “sftp>”}
puts $es “send “bye\n””
flush $es
close $es
set retVal [exec /opt/quovadx/qdx5.7/integrator/tcl/bin/expect $esn >>& /opt/quovadx/qdx5.7/integrator/temp/integrity_cn_sftp.out]