Mail Archives: cygwin/2006/01/23/16:08:41
I've been trying the last two days to get this to work but if fails
using cron with cygwin but works just fine using cron with Fedora
Core 4. If I run myscript.sh from a console the script runs fine.
I can't seem to login to the ftp site when run from cron. Any ideas?
I've tried running this as both Administrator and power user wess.
I updated cywin to whatever was current this morning and tried again
before posting this.
Thanks,
Wes S
crontab -- start
33 15 * * * /home/wess/csplog/myscript.sh
crontab -- stop
email from cron -- start
Connected to cadillacsportsmansclub.org.
220-linhost148.prod.mesa1.secureserver.net NcFTPd Server (licensed copy) ready.
220-Guest logins are not allowed here. You must login with your assigned
220-username and password with your FTP client program. If you're using
220-Internet Explorer, try the "Login as..." menu option under the "File" menu,
220-or in other FTP client programs, you can try this URL:
220-
220- ftp://username AT YourDomainName/ 220 User
(cadillacsportsmansclub.org:(none)): 501 Syntax error in parameters.
Login failed.
221 Goodbye.
done
myscript.sh -- start
#! /usr/bin/bash
HOME=/home/wess
export HOME
datestamp=`date '+ %Y%m%d'`
echo $datestamp
cd /home/wess/csplog
mkdir $datestamp
cd $datestamp
ftp -v ftp.cadillacsportsmansclub.org
echo done
myscript.sh --ends
.netrc -- start
machine ftp.cadillacsportsmansclub.org
login myusername
password mypasswd
macdef init
prompt off
cd stats
mget *
bye
myscript.sh --ends
run from console by directly running ./myscript.sh -start
wess AT barefoot ~/csplog
$ ./myscript.sh
Connected to cadillacsportsmansclub.org.
220-linhost148.prod.mesa1.secureserver.net NcFTPd Server (licensed copy) ready.
220-Guest logins are not allowed here. You must login with your assigned
220-username and password with your FTP client program. If you're using
220-Internet Explorer, try the "Login as..." menu option under the "File" menu,
220-or in other FTP client programs, you can try this URL:
220-
220- ftp://username AT YourDomainName/
220
331 User myusername okay, need password.
230 Restricted user logged in.
prompt off
Interactive mode off.
cd stats
250 "/stats" is new cwd.
mget *
local: .statspwd remote: .statspwd
200 PORT command successful.
150 Opening ASCII mode data connection for .statspwd (21 bytes).
226 Transfer completed.
22 bytes received in 0.009 seconds (2444 bytes/s)
local: BROWSERREP.html remote: BROWSERREP.html
200 PORT command successful.
150 Opening ASCII mode data connection for BROWSERREP.html (6654 bytes).
226 Transfer completed.
6671 bytes received in 0.236 seconds (28266 bytes/s)
local: BROWSERSUM.html remote: BROWSERSUM.html
200 PORT command successful.
150 Opening ASCII mode data connection for BROWSERSUM.html (3869 bytes).
226 Transfer completed.
3882 bytes received in 0.074 seconds (52459 bytes/s)
local: BROWSERSUM_bar.png remote: BROWSERSUM_bar.png
200 PORT command successful.
150 Opening ASCII mode data connection for BROWSERSUM_bar.png (3491 bytes).
226 Transfer completed.
3519 bytes received in 0.063 seconds (55857 bytes/s)
local: DAILYREP.html remote: DAILYREP.html
200 PORT command successful.
150 Opening ASCII mode data connection for DAILYREP.html (6532 bytes).
226 Transfer completed.
I chopped it off fhere.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -