![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling expect scripts from other expect scripts | seva | Shell Programming and Scripting | 0 | 04-03-2008 02:45 PM |
| cronjob | wiz83 | UNIX for Dummies Questions & Answers | 1 | 01-25-2008 02:47 AM |
| sftp not working as cronjob | tungaw2004 | UNIX for Dummies Questions & Answers | 3 | 01-10-2008 08:27 PM |
| Expect and auto expect command | arun_v | Shell Programming and Scripting | 0 | 03-29-2006 08:31 AM |
| Automating SFTP with Expect | sysera | Shell Programming and Scripting | 2 | 09-16-2005 07:05 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
expect + cronjob + SFTP
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 Code:
#!/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 Code:
#!/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 |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|