XML Sitemaps Generator

Author Topic: setup cron job on ubuntu server  (Read 10607 times)

duceduc

  • Approved member
  • *
  • Posts: 8
setup cron job on ubuntu server
« on: August 01, 2010, 01:12:07 PM »
I have a Ubuntu testing web server up and am hosting my own site. I have installed sitemap generator and it is working. I would like to create a cron job but not sure how to go about it. I don't have cpanel.

Here is what I have tried. I have created a crontab and issued this cmd to run daily at 2am. It is not working however.
Code: [external links are visible to admins only]
00 02 * * * /usr/local/bin/php /var/www/domain/httpdocs/generator/runcrawl.php
I noticed /usr/local/bin doesn't have any files in it.



XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10621
Re: setup cron job on ubuntu server
« Reply #1 on: August 02, 2010, 07:29:40 AM »
Hello,

try changing the path for php interpreter to: /usr/bin/php
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

duceduc

  • Approved member
  • *
  • Posts: 8
Re: setup cron job on ubuntu server
« Reply #2 on: August 02, 2010, 07:51:52 AM »
Thank you for your reply.

I've changed the path to /usr/bin/php and did a test run; however, I don't see any changes in google webmaster website.
Looking in the /usr/bin/ directory, there are files in there, but php is not one of them.

duceduc

  • Approved member
  • *
  • Posts: 8
Re: setup cron job on ubuntu server
« Reply #3 on: August 02, 2010, 09:20:42 AM »
Further searching about my server, my php uses apache module instead of CGI.  The script maybe a little different now.
The server needs lynx installed and the script changed to this.
Code: [external links are visible to admins only]
* * * * * lynx -dump http://www.somedomain.com/cron.php
However, it is still not working for me. Am I going about it the wrong way?

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10621
Re: setup cron job on ubuntu server
« Reply #4 on: August 02, 2010, 09:25:06 AM »
In this case you would use something like:
Code: [Select]
lynx -dump http://www.yourdomain.com/generator/index.php?op=crawlprocyou should check if sitemap was created in generator interface though, for google webmaster tools you should submit sitemap manually.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

duceduc

  • Approved member
  • *
  • Posts: 8
Re: setup cron job on ubuntu server
« Reply #5 on: August 20, 2010, 11:12:43 PM »
I have a weird issue with the cronjob now. It was working fine for the past week. I don't get any cronjob email up until now. However, when I check the generator interface, it looks like it was updated.

The email log doesn't seem to be error. I have attached the log labeled cronjob.txt. I was using this cronjob script
Code: [external links are visible to admins only]
00 02 * * * /usr/local/bin/php /var/www/domain/httpdocs/generator/runcrawl.php

In addition, I also tried a different cronjob script to see if I still get an email.
Code: [external links are visible to admins only]
lynx -dump http://www.yourdomain.com/generator/index.php?op=crawlproc
With this script, I still get an email. It is not an error, however.
Quote
  Links depth: -
  Current page: -
  Pages added to sitemap: -
  Pages scanned: - (- KB)
  Pages left: - (+ - queued for the next depth level)
  Time passed: -
  Time left: -
  Memory usage: -

   Completed

  Total pages indexed: 31
  Creating sitemaps...

  Creating HTML sitemap...

  Done, redirecting to sitemap view page.

From my understanding about cronjobs, I would only get emails if the cronjobs didn't properly executed. In these cases, it looks like it did. How can I stop my server to not send this particular job if it is possible?

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10621
Re: setup cron job on ubuntu server
« Reply #6 on: August 21, 2010, 09:09:42 AM »
You can configure the cron task to disable emails.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

 

SMF 2.0.12 | SMF © 2014, Simple Machines
XHTML RSS WAP2