• Welcome to Sitemap Generator Forum.
 

setup cron job on ubuntu server

Started by duceduc, August 01, 2010, 02:12:07 PM

Previous topic - Next topic

duceduc

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.
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.




duceduc

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

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.
* * * * * 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

In this case you would use something like:
lynx -dump http://www.yourdomain.com/generator/index.php?op=crawlproc
you should check if sitemap was created in generator interface though, for google webmaster tools you should submit sitemap manually.

duceduc

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
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.
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.
QuoteLinks 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?