Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: dowload with wget in crontab -e

  1. #1
    Join Date
    Jun 2013
    Beans
    11

    Exclamation dowload with wget in crontab -e

    Hy everyone i want to ask something, i used cron to download linux image and make it as schedule.

    so i was had plan to make a schedule to downloading on 21:30 and in days 25,26,27 and month on june

    Like this :

    30 21 25,26,27 6 * wget -c http://kambing.ui.ac.id/iso/fedora/1...x86_64-DVD.iso /home/jefri

    but it doesn't work by far, since in beginning i've tried..!!

    Would anyone to help me..!!

  2. #2
    Join Date
    Sep 2006
    Beans
    7,241
    Distro
    Lubuntu Development Release

    rsync?

    Do they have an rsync version available? That would allow downloading in full only once and the downloading only the changes, if there are any, on subsequent tries.

    The crontab entry looks ok as far as I can tell. Maybe you should try wrapping wget in a script and calling the script. Sometimes that helps.

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,617
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: dowload with wget in crontab -e

    Whose crontab is this in? jefri's? (That is, /var/spool/cron/jefri usually created with crontab -e.)

    Usually it's preferred to use full paths in crontabs, e.g., /usr/bin/wget rather than just wget, but I doubt that is the problem here.

    However you might be encountering this problem as described in the manual page for wget:

    Beginning with Wget 1.7, if you use -c on a non-empty file, and it turns out that the
    server does not support continued downloading, Wget will refuse to start the download from
    scratch, which would effectively ruin existing contents. If you really want the download
    to start from scratch, remove the file.

    See if it works without the "-c" parameter.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Jun 2013
    Beans
    11

    Re: dowload with wget in crontab -e

    thanks alot for Lars Noodén & SeijiSensei :

    My ideas was just trying wget to downloading an iso file but in a schedule, or i can say it will downloading automatically..!!

    but last night i think the wget script was on working..!

    i used this 30 21 25,26,27 6 * wget -c http://kambing.ui.ac.id/iso/fedora/1...x86_64-DVD.iso and it was done to download

    but the file just put in of the root directory, but if i only used wget and not using crontab at once like this wget -c http://kambing.ui.ac.id/iso/fedora/1...x86_64-DVD.iso /home/jefri.. The iso file has been in /home/jefri directory..!! but by using crontab it was nothing in there..!

    all i wanted is just about i want to do downloading files no matter what it is, by using crontab -e..

    and if downloading is done, files should be in /home/jefri directory..!!


    but thanks alot guys..!


  5. #5
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: dowload with wget in crontab -e

    Support thread.

    Thread moved to General Help.

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  6. #6
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,617
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: dowload with wget in crontab -e

    Use this command instead:

    Code:
    cd /home/jefri; wget ...
    This will run the wget command from the /home/jefri directory.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Mar 2008
    Location
    Denmark
    Beans
    134
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: dowload with wget in crontab -e

    If you do
    Code:
    man wget
    You can then see the syntax for wget. One option when downloading just one file could be
    Code:
    wget -O <output-file> <URL>
    What you did was telling wget to first download your iso file and then download from the url /home/jefri which should give the error "scheme missing".
    That is with wget you do
    Code:
    wget <URL1> <URL2> .. <URLN>
    To download multiple urls.

    Hope this makes sense

  8. #8
    Join Date
    Jun 2013
    Beans
    11

    Re: dowload with wget in crontab -e

    guys it's not working to use this..!!



    cd /home/jefri; wget -c http://kambing.ui.ac.id/iso/fedora/1...x86_64-DVD.iso


  9. #9
    Join Date
    Jun 2013
    Beans
    11

    Re: dowload with wget in crontab -e

    ALSO IT'S NOT WORKING AS USED THIS..!!



    34 10 2,3 7 * cd /jefri wget -c http://kambing.ui.ac.id/iso/backtrac...3-GNOME-32.iso

  10. #10
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,617
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: dowload with wget in crontab -e

    The second one won't work because it is missing a semicolon between the commands. Plus there won't be a /jefri folder unless you created it as root.

    Now can you please say more specifically what you mean when you say it isn't working?

    Why are you continuing to use the "-c" switch when I specifically pointed out earlier that it may be the source of the problem?
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •