Log in

View Full Version : Cron job not working



hemi519
11-24-2011, 01:35 PM
Hi All,

I am using ubuntu 10.04. I am trying to send mails for a particular time from php script.

Steps i have done

1) In terminal i gave crontab -e

2) I saved the below line in my editor and saved it

39 18 * 11 1-5 /usr/bin/php http://localhost/cron/cron.php

But i am not getting any mails. Can any one help me how to achieve this. I googled many links but none is working. Is thr anything to install or any changes, please let me know if thr r any!!

When i directly type the url in my browser i am getting message but not from cron job

hemi519
11-24-2011, 01:44 PM
I got it working


instead of http://localhost/cron/cron.php we have to give /var/www/cron/cron.php. Then everything will work fine