Click to See Complete Forum and Search --> : cron job...
kj1983
04-05-2005, 05:12 AM
Help??
* 0 * * * * lynx http://www.domain.com;
or
* 0 * * * * wget http://www.domain.com;
Is this possible to setup my cron job to run a web pabe every day?
id10t
04-05-2005, 11:54 AM
Yup.
You probably want to use links with the -dump option, and redirect it to /dev/null. Here's how I run a db index daily:
30 1 * * * /usr/bin/links -dump http://localhost/updb.php?update=yes 1> /dev/null 2> ~/cron.errors
So at 1:30am daily, it grabs that page, throws any standard output to /dev/null and any errors go to a file cron.errors in my home directory.
Not sure if lynx has a dump option, but wget may work for what you are doing.
Nikolas
04-11-2005, 07:33 AM
You can also try something like :
0 * * * * curl -s -o /root/curl.txt http://domain.com
This will write every output from the site that you call to the file /root/curl.txt
dalecosp
04-26-2005, 07:26 PM
Originally posted by id10t
So at 1:30am daily, it grabs that page, throws any standard output to /dev/null and any errors go to a file cron.errors in my home directory.
Not sure if lynx has a dump option, but wget may work for what you are doing. It does:lynx -dump http://www.subir.com/lynx.html
What are ya, an id10t or somethin'?? :D
Just kidding!!
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.