Reputation: 27
My script is working fine when I run it into browser but not working when I run it using cron
require_once('/home/dekh/public_html/track/classes/affiliate.class.php');
require_once('/home/dekh/public_html/track/classes/offer.class.php');
require_once('/home/dekh/public_html/track/classes/merchant.class.php');
require_once('/home/dekh/public_html/track/includes/emails.php');
$mer=new Merchant;
$aff=new Affiliate;
$offer=new Offer;
$message = "Line 1\nLine 2\nLine 3";
$message = wordwrap($message, 70);
mail('my email address', 'My Subject', $message);
I get mail when I run it in browser
Here how I've added it in cron
wget /home/dekh/public_html/track/includes/cron_for_conversions_mail.php
php /home/dekh/public_html/track/includes/cron_for_conversions_mail.php
I've tried it both ways php /home.. and wget /home...
Please suggest thanks
Upvotes: 0
Views: 287
Reputation: 176
wget url but not a local file
just like:
http://127.0.0.1/cron_for_conversions_mail.php
Upvotes: 1