Trouble with Cron

TitaniumMan

Registered
Hi,

I'm trying to use CRON to run a simple PHP script that sends an email. However, no email seems to be sent. I just got Postfix up and running, and other email from PHP is sent without a problem.

I tried two commands with the CRON:
Code:
wget [url]http://domain.com/cron.php[/url]
and
Code:
lynx -dump [url]http://domain.com/cron.php[/url]
and it's variant
Code:
lynx -dump [url]http://domain.com/cron.php[/url] > /dev/null

Here is some of the system.log information:
Code:
Jul  2 17:50:00 localhost cron[314]: (greg) RELOAD (tabs/greg) 
Jul  2 17:50:00 localhost CRON[22987]: (greg) CMD (wget [url]http://domain.com/cron.php[/url]) 
Jul  2 17:51:00 localhost cron[314]: (greg) RELOAD (tabs/greg) 
Jul  2 17:51:00 localhost CRON[23012]: (greg) CMD (lynx -dump [url]http://domain.com/cron.php[/url]) 
Jul  2 17:56:00 localhost cron[314]: (greg) RELOAD (tabs/greg) 
Jul  2 17:56:00 localhost CRON[23037]: (greg) CMD (lynx -dump [url]http://domain.com/cron.php[/url] > /dev/null)

I did change domain.com to my machine.

Thanks for any help,
Greg
 
I got this all figured out, so I hope it helps someone else...

To use cron with a PHP script, just use curl:
Code:
curl [url]http://domain.com/cron.php[/url]
 
Back
Top