Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
 Post subject: delayed crontab
PostPosted: Tue Aug 28, 2012 10:33 pm 
Offline
New to forums
New to forums

Joined: Wed May 09, 2012 4:08 pm
Posts: 12
after sending a ticket to support they sent me here so here is my problem.

ok so i set this up the other day and its delayed the times :| by at least 2-4hours... heres my crontab
"
#8:30am
30 08 * * * php /usr/www/flamedog1/mail1.php
#
#10:30am
30 10 * * * php /usr/www/flamedog1/mail2.php
#
#08:30pm
30 20 * * * php /usr/www/flamedog1/mail3.php
#
#10:30pm
30 22 * * * php /usr/www/flamedog1/mail4.php
"
ive tested each script from the ssh console and they worked with no delay. and ive left them outside the "public" folder so that people via the website can not trigger the mail scripts. am i doing something wrong ? or is it crontab's fault ?

here is what the mail script files look like.

<?php
$to = 'email@fake.com;
$subject = 'This is a subject line';
$message = ''msg";
$headers = 'From: info@mywebsiteaddress.com'; <- because when i send it from the server it sends as "flamedog1@hosted10.nfoservers.com"

mail($to, $subject, $message, $headers);
?>


Top
 Profile  
 
 Post subject: Re: delayed crontab
PostPosted: Tue Aug 28, 2012 10:56 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9239
Location: Seattle
I checked the logs and your cronjob is being executed correctly at the appropriate times:

Code:
# grep "flamedog" /var/log/messages | grep CMD
Aug 28 08:30:01 hosted10 cron[23213]: (flamedog1) CMD (php /usr/www/flamedog1/mail1.php )
Aug 28 10:30:01 hosted10 cron[10048]: (flamedog1) CMD (php /usr/www/flamedog1/mail2.php)
Aug 28 20:30:01 hosted10 cron[32326]: (flamedog1) CMD (php /usr/www/flamedog1/mail3.php)
Aug 28 22:30:01 hosted10 cron[16751]: (flamedog1) CMD (php /usr/www/flamedog1/mail4.php)

It could be that your email provider delayed the email delivery.


Top
 Profile  
 
 Post subject: Re: delayed crontab
PostPosted: Tue Aug 28, 2012 11:09 pm 
Offline
New to forums
New to forums

Joined: Wed May 09, 2012 4:08 pm
Posts: 12
weird because when ever i do it manully it sends fine but when its auto sent its delayed X3 ill have to look in to some why to fix this :3 thanks for your help once again ^^


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Fri May 24, 2013 8:06 pm
Powered by phpBB® Forum Software © phpBB Group