Why nodes aren't always deleted on cron? I have this code in my module_cron function (I need to delete old unpublished nodes). 

include_once './modules/node/node.module';
$nids = db_query("SELECT nid FROM node where status = 0 AND UNIX_TIMESTAMP()-changed&gt;172800 LIMIT 2000");
while ($result = db_fetch_object($nids)) {

  echo  "Deleting node ".$result-&gt;nid."&lt;br&gt;";
  node_delete($result-&gt;nid);    
}


It always outputs node ids, but it rarely actually deletes nodes. In fact it seems to totally stop deleting them until I login to admin panel. What am I doing wrong? Is there any way to always delete nodes?
Check this "Running cron as an authenticated user" in http://drupal.org/node/23714
it might be useful for you.