|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
You may need to add the full path to wget in the crontab setup.
0 12 * * * /bin/wget ... |
|
#3
|
|||
|
|||
|
Yes, I add /usr/local/bin/wget
but it still don't work. |
|
#4
|
||||
|
||||
|
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
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > crontab in Linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|