views:

53

answers:

5

I need to index 80.000 nodes.

The max amount of nodes I can index per each cron run is 500.

I need to run crone 80.000 / 500 times to index the entire website.

How can I automatically schedule these runs (when a run is finished, the next run automatically should start)?

I don't have SSH access so I cannot use drush.

Thanks

A: 

Why don't you set a cronjob every 4 minutes or so? Just make sure that the interval between cronjobs is longer than the time it takes to run the cron script, so it won't overlap.

marcvangend
because the minimum amount of time in the UI is 3 hours
Patrick
Does that mean each cron run of 500 nodes takes 3 hours? I'm curious: what are you indexing that is so big?
DrColossos
I guess Patrick means that his host provides a UI which only allows him to set cronjobs with at least a 3 hour interval.
marcvangend
@marcvangend: exactly
Patrick
A: 

Did you try Poormanscron?

A module which runs the Drupal cron operation using normal browser/page requests instead of having to set up a crontab to request the cron.php script. The module inserts a small amount of JavaScript on each page of your site that when a certain amount of time has passed since the last cron run, calls an AJAX request to run the cron tasks. Your users should not notice any kind of delay or disruption when viewing your site. However, this approach requires that your site gets regular traffic/visitors in order to trigger the cron request.

kiamlaluno
yeah I'm using it. But the point is that the minimum allowed interval in backend is 1 hour.
Patrick
+1  A: 

All cron does is visit yoursite.com/cron.php

So you could use cron/schedule task/etc on a local machine.

Chris Ridenour
I don't have access to the server configuration and I don't have ssh access. I can only run with poormanscron, but there is not option for lower intervals
Patrick
What he's suggesting is using a scheduled task on your local machine (cron in linux or scheduled tasks in windows) to hit yoursite.com/cron.php. When you run cron normally through the site all it does is hit the cron.php so you will emulating that. You don't need to have ssh or poormanscron to do it.
digital
As digital said, I am saying use the cron mechanism of the machine you're currently typing on to vist yoursite.com/cron.php and not the server itself. Having the _actual server_ run cron is more of a convenience rather than a requirement.
Chris Ridenour
A: 

Give a try to Apache Solr Search module in drupal.

Satya
A: 

To reiterate and clarify other answers: As long as you haven't explicitly blocked it in .htaccess or Apache configuration, you can trigger Drupal's cron.php simply by visiting yoursite.com/cron.php from any browser. You can also set up your local machine (or any other machine that has web access, really) to run its own cronjob which triggers your site's cron.php. This process varies from platform to platform, but for example, on most Linux systems, you could run crontab -e and add a line like this:

0 * * * * wget -O - -q -t 1 http://www.example.com/cron.php
# Run example.com's cron tasks at the beginning of every hour.

or possibly:

*/5 * * * * wget -O - -q -t 1 http://www.example.com/cron.php
# Run example.com's cron tasks at every five minute interval.
peterjmag

related questions