I was trying to work out why cron wouldn't run on my site and came across this post: http://codekarate.com/blog/drupal-6-fixing-stuck-cron-run which said that enabling and disabling search would fix it. It did, but does anyone know why search breaks cron?

1 Answer 1


The Search module implements hook_cron(), and its implementation it invokes hook_update_index() to update the search index. One of that hook implementations is node_update_index(), which

  • Loads some nodes whose IDs are returned from a query
  • Renders those nodes, and passes their body content to search_index()

If the node body contains PHP code that redirects the users to a different page, or an implementation of hook_nodeapi() redirects the users when a node is viewed, that can cause problems to cron tasks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.