The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I just want to schedule a job to ftp one file

Discussion in 'General Discussion' started by workshop, Aug 15, 2007.

  1. workshop

    workshop Member

    Joined:
    Sep 21, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    On the face of this my requirement seems quite simple - yet I have searched the forums, can cannot find a simple solution...?

    Basically I have ONE file - file.txt that I would like to ftp on a daily basis to an ftp server.

    I hoped there would be a simple cron command that I could set up that I can specify the credentials.

    Something as simple as

    ftp file.txt to ftp.mysite.com etc

    Anybody got any ideas...?

    Thanks.
     
  2. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    google for tftp as this is much simpler and fast.
     
  3. workshop

    workshop Member

    Joined:
    Sep 21, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Sorry - not sure I follow.

    I want to set this to be an automated job which occurs every day without any action on my part.

    Any ideas?
     
  4. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    This needs to be done through a script configured as a cron job.
     
  5. workshop

    workshop Member

    Joined:
    Sep 21, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Okay - any ideas on a suitable script?

    I really want to keep it simple - so a script that just opens the ftp connection and then copies the one file.

    Anybody got any ideas...?

    Thanks.
     
  6. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    TFTP is a bad idea, don't go there.

    If you search for ftp and cron you should find many examples both here and on Google.

    Something like this in a script run from cron will work:

    ftp -n machinename.com <<!
    user username password
    put localfilename remotefilename
    quit
    !
     
  7. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    Ncftp should help. It is mentioned in the forums, and I think there are some samples too.
     
Loading...

Share This Page