Web Hosting Talk







View Full Version : Daily cronjob on a Raq3


risul
06-04-2001, 09:48 PM
Hi,

I'm trying to setup a daily cronjob for a .php file on my Raq3.

I understand that Red Hat Linux is a little bit different from other UNIX system. A cgi file must be added to /etc/cron.daily directory. My problem is that I do not know how to write a perl-program.

what I need to do is to to run a this file once a day:
/home/sites/home/web/mail.php

Can anyone help??

Thanks!
Risul

Gilby
06-04-2001, 10:51 PM
A script doesn't need to be perl, it can be any kind that can be interpreted by the shell.

Put a script in the cron directory that has the following in it and it should work:
#!/bin/bash
wget http://www.yourdomain.com/mail.php --output-document=/dev/null > /dev/null

jaime
06-05-2001, 02:50 AM
Hi,

Just create a file with .pl extension with only this line in it and place it in /etc/cron.daily/:

lynx -dump http://www.yourdomain.com/mail.php

This will invoke that php file with the Lynx comand line browser everyday.

risul
06-05-2001, 01:41 PM
Thank you both,

I'll try this today!

Risul