LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-02-2009, 06:56 AM   #1
stokilo
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: Disabled
cron+wget = multiple downloads


Hi

I have a problem with very simple combination of wget+cron on my ubuntu server.
I created file execute.cron as normal user

execute.cron :

16 * * * * wget -t 0 www.page.com > output.log

next i run : crontab execute.cron

Task was invoked properly but i as i result is should get one index.html page. When i run this from command line that is the case. Using cron i get

index.html
index.html.1
index.html.2
and so on

What can be a reason that cron + wget run multiple downloads ?


Best regards
Slawek
 
Old 03-02-2009, 11:49 AM   #2
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
use the -O (capital 'O') option to force output file to retain a static file name. wget will append a .1, .2, .3, etc to index.html if that file exists locally already -- this is normal behavior and you would have found that behavior at the command line also. prove it to yourself by running the command multiple times at the command line.

also why not use -o output.log instead of redirecting stdout to output.log?

so just to be clear, the command would look like

wget -t0 -O index.html -o output.log http://www.page.com

Last edited by grepmasterd; 03-02-2009 at 11:50 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the destination of downloads when using wget? Uxq Linux - Newbie 1 07-02-2008 08:56 PM
downloads stalling using firefox, wget, etc Radelix Linux - Networking 6 03-18-2008 10:49 AM
it downloads in firefox, not in wget moob8 Linux - Desktop 3 02-10-2007 09:40 AM
Where are wget downloads saved when using bash? kb9agt General 6 01-29-2007 11:04 AM
Running wget multiple downloads simultaneously stefaandk Linux - Newbie 1 09-04-2006 07:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration