Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    151
    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:
    402
    Likes Received:
    3
    Trophy Points:
    168
    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:
    151
    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:
    3
    Trophy Points:
    168
    Location:
    Planet Earth
    This needs to be done through a script configured as a cron job.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. workshop

    workshop Member

    Joined:
    Sep 21, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    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:
    168
    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
    !
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    168
    Ncftp should help. It is mentioned in the forums, and I think there are some samples too.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice