Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 20th, 2003, 10:57 PM
itsource itsource is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 181 itsource User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 7 m 31 sec
Reputation Power: 7
crontab in Linux

I want to copy file from website and save in my server, when I run this command in shell prompt, it work correctly

root@web:~# wget -bO /web/web_ps/thex-new/crontab/DATA.HTM http://www.bankasia4u.com/Main/Bank..._Rates/DATA.HTM
2>&1 > /dev/nul


but when I run in crontab ( add 0 12 * * * ) it don't copy file. and I don't know where to see log file.


1. Why it doesn't work when I put in crontab. Is something wrong?
2. I test crontab in my computer. When it already run. It send email to me. I can check by use Pine. but this command don't send any email to me. Why it doesn't send?
3. When I run wget in shell. It also save log file (wget-log wget-log.1 wget-log.2 wget-log.3). If I run in crontab. Where it save logfile?
4. I don't know what " 2>&1 > /dev/nul" in command mean?

Reply With Quote
  #2  
Old February 20th, 2003, 11:27 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: May 2001
Location: Ft Myers, FL
Posts: 4,097 kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 2 Weeks 5 Days 22 h 24 m 26 sec
Reputation Power: 532
Send a message via ICQ to kicken Send a message via AIM to kicken Send a message via MSN to kicken
You may need to add the full path to wget in the crontab setup.

0 12 * * * /bin/wget ...

Reply With Quote
  #3  
Old February 21st, 2003, 12:57 AM
itsource itsource is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 181 itsource User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 7 m 31 sec
Reputation Power: 7
Yes, I add /usr/local/bin/wget

but it still don't work.

Reply With Quote
  #4  
Old March 1st, 2003, 12:20 PM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,296 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 5 m 42 sec
Reputation Power: 101
Send a message via ICQ to christo Send a message via Yahoo to christo
alternative

I'd do it another way...

write a little perl script with a LWP UserAgent to fetch the data for you - and hey, you could even parse it on the way in too.

Anyway, &1 > /dev/null and &2 > /dev/null cause any output to stdout and stderr to be redirected to /dev/null

Are you sure that you are running crontab after you have editedt the file.. eg

# vi /var/spool/cron/crontabs/root

[make changes and save]

# crontab /var/spool/cron/crontabs/root


christo

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > crontab in Linux


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway