Cron fails when calling hook_node_view When running cron manually via GUI the cron starts to run but I have traced down the failure to hook_node_view in one of my modules.

The code is:

if ($node-&gt;nid == 47)
{
     //THIS CODE IS HAPPENING, but HOW in hook_node_view when running cron?
     drupal_goto('node/48'); 
}
When you implement hook_node_view(), don't forget to check if you're really displaying the node using this code:

function MYMODULE_node_view($node, $view_mode, $langcode) {
  if ($view_mode == 'full' &amp;&amp; node_is_page($node)) {
    //Do something...
  }
}


This should correct your errors.