Mohammedz.com

For Linux and Shell scripting.

Install wget on windows and setup scheduled tasks using wget

22 Comments


WGET is a non-interactive network downloader which supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.

In order to setup wget on windows machines, download wget.exe:

http://users.ugent.be/~bpuype/wget/wget.exe

Copy it to: C:\wget\ and C:\WINDOWS\system32. Now, you will be able to execute the “wget” command as in any *nix machine.

If you want to setup any scheduled task using wget, use the “Run” field in scheduled task as:
C:\wget\wget.exe -q -O nul “http://domain.com/shedule.me”

About these ads

22 thoughts on “Install wget on windows and setup scheduled tasks using wget

  1. can i make multiple download using wget
    hoping for your response

    more power

  2. Yes, you should be able to make multiple downloads together using wget. Just separate the urls with spaces.

    ~mohammed

  3. i have install nncron and wget in my laptop to run my system but there is a problem where the cmd windows will pops up.
    how can i run the wget n nncron in my system without showing any other windows?

    hope for ur help..
    thanks.

  4. I believe that windows 2000 scheduled tasks had a way to uncheck a box, making the task non-interactive. As I don’t see that check box any longer, here are two alternatives I can think about:

    1) run your scheduled tasks in minimized windows.
    add /minimize switch to your start command

    2) schedule tasks with a different username, that you don’t use to login directly.

    ~mohammed

  5. Is the code ‘-q’ and ‘-o’ at here :
    “C:\wget\wget.exe -q -O nul “http://domain.com/shedule.me”
    have any meaning @use? can i use other like: “C:\wget\wget.exe -O – -q -t 1 nul “http://domain.com/shedule.me”

    I also want to make the pops up windows(i think is cmd windows) to stop appear at my screen every 15 minutes. Because i set the wget and nncron to run every 15 minutes.

    Hope to hear from you soon..
    Thanks.

    Annie

  6. I would request you to type the commands rather than copy-pasting. Due to difference in encoding, some characters may change while copy-pasting (like -, ” etc).

    You can get the help message of wget.exe and try every options that you like :)

    In my previous comment, I have mentioned 2 ways (to avoid pop-up windows) that I know about. I’m sure that you can find a better way if you search a bit harder.

    ~mohammed

  7. i have retype the commands and the pop up windows still will appear in my screen.
    i have install the nncron lite version 1.17 n wget into my laptop.. so i type the command in crontab:
    */15 * * * * C:\Program Files\GnuWin32\bin\wget.exe -b -q -O -t 1 http://localhost:8080/staffinfo/remindersend4.php
    i’m appologize because i dont get what you means in previous comment… changing the -q @ -b in command line cannot avoid the pop up windows?

  8. My badluck :(. I was talking about windows task scheduler rather than nncron. I never used nncron and I don’t have enough time to try it out right now.

    You should be able to block pop-up windows by editing your cron.ini file. Try switching OFF the AsLoggedUser variable. See this url for more details:

    http://www.nncron.ru/nncronlt/help/EN/add_info/cron.ini_variables.htm

    ~mohammed

  9. Actually i have try to change the ON to OFF, but the pop up window still will appear..
    I’m from Sarawak, Malaysia.

  10. Annie,

    since I haven’t used nncron before, I can just show you the way. You better dig in nncron forum or kb. Btw, I just noticed the following options which may help you to block the pop-up windows.

    SWHide – Hide program window
    ShowNoActivate – Do not make the window active when starting application

    visit this url for more details:

    http://www.nncron.ru/help/EN/commands/start_app.htm

    ~mohammed

  11. I have got it !!
    I manage to avoid the pop up window to appear again..
    This is the command that i use:
    Cronlog: “log\nncron.log”
    LogTimeFormat: “%DD% %MM% %hh%:%mm%:%ss% %ThreadId%”
    YearField OFF
    DefaultOpenMode: SWHide
    DefaultPriority: NormalPriority
    AsLoggedUser ON
    DefaultRunMissedTime: 15
    Thank you so much for your help. Really appreciate for your kindness to share the information and knowledge with me.

    Annie

  12. Thank you Annie.

    Thank you for posting the solution here :)

    ~mohammed

  13. hello Mohammed. i have followed your steps in installing wget in windows but the program is failing to work.it keeps giving me the “connection timed out. please help.thank you in advance.

  14. The “connection timed out” error means the system is unable to make a connection to the destination server. It could either be a local network issue or the destination server is not responding. I would suggest to verify the network connection first (either through browser or from command line).

    ~mohammed

  15. wget is great!, much better than WINhttrack :)

  16. I am trying to install wget on windows xp. I have copied the binary to my drive but when I execute wget http://www.google.com. I lineay32.dll does not exist. I verified it is not in my system32 directory. I then tried to download it from the web and install using regsvr32. It say it loaded it butl has no entry point.

    I found a web site that said install openssl. I installed that and now the dll is in the system32 directory.
    I next tried to execute wget again and still get that error.

    any help would be appreciated
    phil

  17. hihi, thanks for posting and discusses everyone…

  18. Hi,

    I wanna download CSV file from the client server. I was trying to use wget to download the file it is showing error like “Unknown Host”. Can u give me any suggestion for this. Thanks

  19. Hi
    How can i use wget to download to folders with spaces in their name? Let’s say to “c:\Progam Files\Some Folder”
    I have google’d but can’t find any relevant answer.
    What i use now is “wget -nd -r -P c:\foldername\ -A jpg,gif,png http://site.tld” but i’d like to use as: “wget -nd -r -P c:\Program Files\Folder Name\ -A jpg,gif,png http://site.tld

    Thanks in advance

  20. Hi ,
    I have downloaded wget -1.10.2 version on windows machine(i.e. my laptop) and tryiedexecuting command(wget -m http://www.yahoo.com) but its showing me error Failed:unknown host .

    Appriciate if you could help me in this regards

  21. Pingback: Wget windows | Litofoto

  22. Hi,

    I need a help. I have to download huge files and s/w from http://archive.cloudera.com/cdh4/ubuntu/lucid/

    I have downloaded and copied wget into C drive and also C:\windows\system32 folder. But still I am not able to run this wget from cmd prompt.

    Please do guide and appreciate ur help asap.

    Thanks
    Arun

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.