PDA

View Full Version : Cron file


subog
08-26-2001, 02:41 PM
Hi,
I need a little help about cron tab command.

Below is the content of the 2 files:

=========
Filename: cronfile.wget
Content:
30 * * * * /path/to/wget --spider -q http://www.yoursite.com/build.php
0 0 * * * /path/to/wget --spider -q http://www.yoursite.com/build.php
=========
Filename: cronfile.lynx
Content:
30 * * * * /path/to/lynx -dump http://www.yoursite.com/update.php >/dev/null
0 0 * * * /path/to/lynx -dump http://www.yoursite.com/update.php >/dev/null
=========
In telnet, what EXACTLY the command do I have to type to cron those 2 files?

Do I just type:
crontab cronfile.wget
crontab cronfile.lynx
when I'm into the directory I have uploaded the 2 files?

Thank alot for your help.

Hypo
08-26-2001, 03:22 PM
Yeah, and then you can check it using the crontab -l function. I upload my cronjob files in the root directory, but they should work from anywhere.

Sandy
08-26-2001, 03:25 PM
you need to telnet (or SSH) into your server, and change into the directory where you have uploaded cronfile. Once in that directory, issue the following command:


crontab cronfile

This will enter all of the commands in cronfile, and the server will begin executing them at the selected times. To double check your crontab entries, you can issue the following command:


crontab -l

Sandy

subog
08-26-2001, 03:41 PM
Thank alot..
But how can I check if the server use lynx and/or wget?

Simon
08-26-2001, 03:53 PM
if your runing a redhat linux server those come precompiled.


if your runing freebsd go to the ports section and you can easily install them from there.