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!

Cron job - download file?

Discussion in 'General Discussion' started by rossco, Oct 24, 2010.

  1. rossco

    rossco Member

    Joined:
    Dec 22, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    51
    Hello, I need some help on how to download a file using a cron job.

    I need to download a zip file from an ftp address on a separate server from where the cron job will run, get the file and put it in a particular directory on the server.

    Could someone tell me how I can do that please?
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,554
    Likes Received:
    9
    Trophy Points:
    168
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I believe a command like the following should accomplish the desired task:
    Code:
    # wget ftp://ftp.domain.tld/path/to/remote/file -O /path/to/local/file
     
    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