web hosting line
1.866.605.2484

Web hosting

Go Back   Web Hosting Forum - Web hosting discussion at SiteGround.com > Popular Software > Other Software and Applications

Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2009, 01:16 PM
rutherford rutherford is offline
Junior Member
 
Join Date: Feb 2009
Posts: 12
Default crontab not working

I set a manual cron job that runs a php script. Is there an easy way to check that the script got run? I tried a few things like echo'ing debug statements in the php script to pinging urls with file_get_contents but no http get request was recorded on my logs.

How do I check if my job was executed?

It was meant to go off at 1200 CST - about 20 minutes ago (daily job).

cron record:

0 12 * * * /usr/local/bin/php -q /public_html/path/to/script.php
Reply With Quote
  #2  
Old 11-01-2009, 03:22 PM
Niko's Avatar
Niko Niko is offline
SiteGround Team Member
 
Join Date: May 2007
Posts: 288
Default

Hello Rutherford,

When specifying the path to your file, you should fill in the full path to that file, i.e. /home/username/public_html/path/to/script.php.

As for the output of the script, you can add your email address in the "Please enter an email address where the cron output will be sent" field in the upper right corner of the main Cron Jobs page.

For more detailed information, please refer to the following tutorial of ours:

http://www.siteground.com/tutorials/.../cron_jobs.htm
__________________
Best Regards,
Niko
SiteGround Technical Support Team

Join us on Facebook
Follow us on Twitter
Web Hosting Suitable for You!
Reply With Quote
  #3  
Old 11-01-2009, 04:40 PM
rutherford rutherford is offline
Junior Member
 
Join Date: Feb 2009
Posts: 12
Default

thanks for the quick response - I've confirmed it's working now by another route, but I still don't get the email even though I've set my mail address.

I've changed my domain MX record to point to Google apps mail servers - could that be a reason? Or does crontab use a separate mail account from my own to send out the mail - if so what could be the reason for no response?
Reply With Quote
  #4  
Old 11-03-2009, 05:57 AM
Niko's Avatar
Niko Niko is offline
SiteGround Team Member
 
Join Date: May 2007
Posts: 288
Default

Hello Rutherford,

For the remaining email issue I advise you to post a technical support ticket under the following section in our HelpDesk:

Service Related Problems -> Email related problems

Since the MX records of your domain name point elsewhere, the problem is most likely caused by an obsolete record pointing to our server in your domain's DNS zone or the existence of a record for your domain in the localdomains file on the server instead of the remotedomains.
__________________
Best Regards,
Niko
SiteGround Technical Support Team

Join us on Facebook
Follow us on Twitter
Web Hosting Suitable for You!
Reply With Quote
  #5  
Old 11-03-2009, 06:45 AM
rutherford rutherford is offline
Junior Member
 
Join Date: Feb 2009
Posts: 12
Default

thanks for reply Niko

However the email support ticket form is too restrictive - it will not let me describe the problem I am having (it asks for email client etc - this is obviously not an issue for me)

How can I submit an appropriate ticket?
Reply With Quote
  #6  
Old 11-03-2009, 06:49 AM
Niko's Avatar
Niko Niko is offline
SiteGround Team Member
 
Join Date: May 2007
Posts: 288
Default

Hello Rutherford,

In this case, post it under the following section:

Service Related Problems -> cPanel related problems

We have no means of providing sections for each and every problem that might occur, but we have done our best to categorize the HelpDesk in an adequate manner, so that you can post a ticket in the closest section in case like yours.
__________________
Best Regards,
Niko
SiteGround Technical Support Team

Join us on Facebook
Follow us on Twitter
Web Hosting Suitable for You!
Reply With Quote
Reply

Tags
cron

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Template j15-62 right not working Noah Free Joomla Templates 3 01-20-2009 08:32 AM
SEF not working Run4it Mambo and Joomla Forum 12 05-28-2008 08:33 AM
header() not working!!! :( umanggoyal PHP Forum 5 03-29-2008 11:15 AM
flash not working Siege Other Topics 2 08-20-2007 09:47 AM
ftp changes not working andyahoo Mambo and Joomla Forum 1 02-20-2006 12:09 PM


All times are GMT -5. The time now is 01:01 AM.

Copyright © SiteGround.com Inc