diff -rup ./apachesolr.admin.inc ../changed/apachesolr.admin.inc
--- ./apachesolr.admin.inc	2010-12-29 13:46:06.000000000 +0100
+++ ../changed/apachesolr.admin.inc	2010-12-29 14:32:56.000000000 +0100
@@ -42,6 +42,21 @@ function apachesolr_settings() {
     '#default_value' => variable_get('apachesolr_path', '/solr'),
     '#description' => t('Path that identifies the Solr request handler to be used.'),
   );
+  $form['apachesolr_disable_cron'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Disable cron'),
+    '#default_value' => variable_get('apachesolr_disable_cron', FALSE),
+    '#description' => t('Check to disable updates by cron.'),
+  );
+
+  $numbers = drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
+  $form['apachesolr_iteration_limit'] = array(
+    '#type' => 'select',
+    '#title' => t('Drush iterations'),
+    '#default_value' => variable_get('apachesolr_iteration_limit', 50),
+    '#options' => $numbers,
+    '#description' => t('Number of times to iterate the chosen number of items to index. This is a matter of testing. The only problem here is the scripts execution time and how much memory is lost to PHP and static variables.', array('@cron' => url('admin/reports/status')))
+  );
 
   $numbers = drupal_map_assoc(array(1, 5, 10, 20, 50, 100, 200));
   $form['apachesolr_cron_limit'] = array(
diff -rup ./apachesolr.module ../changed/apachesolr.module
--- ./apachesolr.module	2010-12-29 13:46:06.000000000 +0100
+++ ../changed/apachesolr.module	2010-12-29 14:02:44.000000000 +0100
@@ -577,6 +577,15 @@ function apachesolr_index_get_last_updat
  * Implementation of hook_cron().
  */
 function apachesolr_cron() {
+  if(variable_get('apachesolr_disable_cron', FALSE)) {
+    return;
+  }
+  else {
+    apachesolr_cron_scheduled();
+  }
+}
+
+function apachesolr_cron_scheduled() {
   try {
     $solr = apachesolr_get_solr();
 
diff -rup ./apachesolr_search.module ../changed/apachesolr_search.module
--- ./apachesolr_search.module	2010-12-29 13:46:06.000000000 +0100
+++ ../changed/apachesolr_search.module	2010-12-29 14:12:49.000000000 +0100
@@ -90,6 +90,9 @@ function apachesolr_search_menu_alter(&$
  * Implementation of hook_cron(). Indexes nodes.
  */
 function apachesolr_search_cron() {
+  if (variable_get('apachesolr_disable_cron', FALSE)) {
+    return;
+  }
   $cron_limit = variable_get('apachesolr_cron_limit', 50);
   $rows = apachesolr_get_nodes_to_index('apachesolr_search', $cron_limit);
   apachesolr_index_nodes($rows, 'apachesolr_search');
diff -rup ./drush/apachesolr.drush.inc ../changed/drush/apachesolr.drush.inc
--- ./drush/apachesolr.drush.inc	2010-12-29 13:46:07.000000000 +0100
+++ ../changed/drush/apachesolr.drush.inc	2010-12-29 14:33:07.000000000 +0100
@@ -6,6 +6,8 @@
  *   drush integration for apachesolr.
  */
 
+define('APACHESOLR_DRUSH_LOCK',  'apache_solr_lock');
+
 /**
  * Implementation of hook_drush_command().
  *
@@ -57,6 +59,10 @@ function apachesolr_drush_command() {
       'keywords' => dt('One or more keywords, separated by spaces.'),
     ),
   );
+  $items['solr-update-index'] = array(
+    'callback' => 'apachesolr_drush_update_index',
+    'description' => dt('Update index'),
+  );
   return $items;
 }
 
@@ -149,3 +155,47 @@ function apachesolr_drush_solr_search() 
     drush_print($output);
   }
 }
+
+function apachesolr_drush_update_index() {
+  if($running = variable_get(APACHESOLR_DRUSH_LOCK, 0)) {
+    if(($running + 300) < time()) {
+      echo "Been running for too long (> 300s). Restarting.\n";
+      $running = 0;
+    }
+  }
+  if($running) {
+    // already running
+    return;
+  } 
+  else {
+    variable_set(APACHESOLR_DRUSH_LOCK, time());
+    register_shutdown_function('apachesolr_drush_shutdown');
+  }
+  $i    = 0;
+  $runs = variable_get('apachesolr_iteration_limit', 2);
+  while($i < $runs) {
+    $cron_limit = variable_get('apachesolr_cron_limit', 50);
+    $rows = apachesolr_get_nodes_to_index('apachesolr_search', $cron_limit);
+    $count_removed = 0;
+    foreach($rows as $key => $row) {
+      $status = weblib_update_product_status($row->nid);
+      if(!$status) {
+        unset($rows[$key]);
+        echo $row->nid."\n";
+        $count_removed++;
+        apachesolr_delete_node_from_index($row);
+      }
+    }
+    echo "Nodes removed from index ".$count_removed."\n";
+    if(count($rows) > 0) {
+      echo "Nodes to be added to index ".count($rows)."\n";
+      apachesolr_index_nodes($rows, 'apachesolr_search');
+    }
+    $i++;
+  }
+  variable_set(APACHESOLR_DRUSH_LOCK, 0);
+}
+
+function apachesolr_drush_shutdown() {
+    variable_set(APACHESOLR_DRUSH_LOCK, 0);
+}
\ No newline at end of file
Only in ./: drush.patch
