Operating System - Linux
1753396 Members
7258 Online
108792 Solutions
New Discussion юеВ

Download web page from cron

 
SOLVED
Go to solution
Vladimir Fabecic
Honored Contributor

Download web page from cron

Hello
I need to download a web page (to a text file) from a cron script. Web page is also a text file.
Any good idea from where to start?
In vino veritas, in VMS cluster
10 REPLIES 10
spex
Honored Contributor

Re: Download web page from cron

spex
Honored Contributor

Re: Download web page from cron

Murat SULUHAN
Honored Contributor
Solution

Re: Download web page from cron

Hi Vladimir,

wget http:/www.hp.com/index.html -O myTextFile.txt

Best Regards
Murat Suluhan
Peter Godron
Honored Contributor

Re: Download web page from cron

Vladimir,
I installed wget, but ran into problems as our company does not allow direct access to external Web (proxy setup).
Check this before you start !
spex
Honored Contributor

Re: Download web page from cron

If you don't want to install new software, telnet will also work.

#!/usr/bin/sh

{
telnet www.google.com 80 << _EOF_
GET / HTTP/1.1


exit
_EOF_
} > index.html

exit

Murat SULUHAN
Honored Contributor

Re: Download web page from cron

Hi Spex

thanks for excellent tip

Best Regards

Murat Suluhan
Vladimir Fabecic
Honored Contributor

Re: Download web page from cron

Thanks guys
I forgot wget. Very good idea.
Solution with telnet is also good.
In vino veritas, in VMS cluster
Arunvijai_4
Honored Contributor

Re: Download web page from cron

Hi Vladimir,

I would also consider HTTrack if it going to be a linux machine.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Vladimir Fabecic
Honored Contributor

Re: Download web page from cron

No, it is a HP-UX machine. Wget idea is perfect.
HTTrack? Is there something like that for HP-UX?
In vino veritas, in VMS cluster