Cron job and Access Denied function
hook_node_view() shouldn't be used for access checks, there's hook_node_access() for that sort of situation:

function MYMODULE_node_access($node, $op, $account) {
  $type = is_string($node) ? $node : $node-&gt;type;
  if ($type == 'abc' &amp;&amp; $op == 'view') {
    return $account-&gt;uid &gt; 0;
  }
}


That'll handle the access check for the node gracefully, and shouldn't stop cron running halfway through.