Hi all, i got a really strange problem
i wrote a script, when i run this script manually everything works fine
but when i make a cronjob for it, with the same user, the EXPECT script will not work.
Only the first line will be executed
this is the SHell bash script
#!/bin/sh;
php -q /home/tsjingcom/HTML/consumentbeheer/files_cassis/scripts/export.php > /home/tsjingcom/HTML/consumentbeheer/files_cassis/scripts/export_php.log;
sleep 5
/usr/bin/expect /home/tsjingcom/HTML/consumentbeheer/files_cassis/scripts/export.exp > /home/tsjingcom/HTML/consumentbeheer/files_cassis/scripts/export_transfer.log;
this is the EXPECT script
#!/usr/bin/expect
spawn sftp -o port=10022 -b /home/tsjingcom/HTML/consumentbeheer/files_cassis/scripts/batchfiles/export.batch user@host:incoming
expect "user@'s password:"
send "\r"
interact
i really hope someone can give me a sollution, i am trying for 2 months to fix this