trying cron job to ftp file to another server

From: Robin (robin_at_witkopstaub.com)
Date: 10/12/04


Date: 12 Oct 2004 12:08:05 -0700

I am trying to write a cron job that will put some daily files onto
our AS400. The cron job is having problems authenticates to the
AS400. The login information doesnt appear to be getting passed
right. All the commands work if I run them one by one from the
console.

Here is my cron job abd the results when you run it.
***************************
#!/bin/sh
#
cd /var/log
ftp -n 192.168.3.9
  user ISBACKUP notape
  binary
  put mail1og.1
  y
  bye
**************************
[root@mail rrw]# cd /etc/cron.maillog/
[root@mail cron.maillog]# ./maillog
Connected to 192.168.3.9.
220-QTCP at AS400.
220 Connection will close if idle more than 5 minutes.
Remote system type is .
ftp>



Relevant Pages

  • Re: /etc/cron.daily/tripwire-check
    ... I understand the importance of Trip Wire when it pertains to ... If there is no connection to the outside world, ... > best way to disable this cron job from running, ... but still run your other cron.daily jobs, without removing it or moving it. ...
    (comp.os.linux.security)
  • error on ftp cron job to another server
    ... I am trying to write a cron job that will put some daily files onto ... The cron job is having problems authenticates to the ... ftp -n 192.168.3.9 ... 220 Connection will close if idle more than 5 minutes. ...
    (comp.os.linux.misc)
  • Re: [PHP] Handle time-outs and errors with file()
    ... handle a broken network connection or even a time-out (slow ... remote connection in real time. ... I would have a cron job that ... If you can cache it but cannot run cron jobs, ...
    (php.general)
  • Re: scp and password as parameter
    ... ea> I don't want to use identity-files because in my case if someone ... ea> gets access to the server he is able to make a connection to ... Rather than reading the password from the cron job? ...
    (comp.security.ssh)
  • Re: Best Way to Handle All Exceptions
    ... catch any exception that may occur, take that and print it out s> ... s> from ftplib import FTP ... What's the point of a cron job that doesn't do what it is supposed to, ... but incorrect code that doesn't crash is a horrible ...
    (comp.lang.python)