![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cronjob | wiz83 | UNIX for Dummies Questions & Answers | 1 | 01-24-2008 10:47 PM |
| cronjob not working | manna | UNIX for Advanced & Expert Users | 8 | 01-17-2008 06:11 AM |
| SFTP not working in cron | ewilson0265 | Shell Programming and Scripting | 4 | 12-02-2007 07:29 AM |
| CronJob | hcng08 | HP-UX | 1 | 08-01-2006 07:44 PM |
| cannot run cronjob | shahrahulb | UNIX for Advanced & Expert Users | 3 | 10-28-2004 06:45 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
sftp not working as cronjob
hi,
I have a script that will automatically login into a server and get a file. it is working fine if i run it on a command line. however, when i tried to run it as a cron job, it is not working. what should i do? set timeout -1 spawn /usr/bin/sftp user1@server1 match_max 100000 expect -exact "Connecting to server1...\r user1@server1's password: " send -- "passwordtxt\r" expect -exact "\r sftp> " send -- "cd .ssh\r" expect -exact "cd .ssh\r sftp> " send -- "get file1\r" expect -exact "get file1\r Fetching /users/user1/.ssh/file1 to file1\r sftp> " send -- "exit\r" expect eof NOTE: i do not want to use scp,ftp,cp or any other filetransfer because it needs some keys to be setup. all i want to do is run this as a cron job. thanks, |
| Forum Sponsor | ||
|
|