Node Update Problem on hook Cron I am trying to update a node in a hook_cron() function. I am using Drupal 6.
Here is my code:
function offers_cron() {
  $query= db_query(&quot;SELECT * FROM {node} WHERE type = 'product'&quot;);
  while($allnodes = db_fetch_object($query)){
    $node_id=$allnodes-&gt;nid;
    $node=node_load($node_id);
    
    $node = new stdClass();
    $node-&gt;nid = $node_id;  
    
    $node-&gt;type = 'product';
    $node-&gt;language = 'en';
    $node-&gt;uid=1;
    $node-&gt;status = 1; 
    $node-&gt;created = time();
    $node-&gt;changed = $node-&gt;created;
    $node-&gt;comment=0;
    $node-&gt;promote = 0; 
    $node-&gt;sticky = 0;  
    $node-&gt;format = 2;  
    $node-&gt;title='test';
    $node-&gt;field_price[0]['value']='120';

    if ($node = node_submit($node)) {
      node_save($node);
      drupal_set_message(t(&quot;Node &quot;.$node-&gt;title.&quot; added correctly&quot;));
    } else {
      drupal_set_message(t(&quot;Node &quot;.$node-&gt;title.&quot; added incorrectly&quot;), &quot;error&quot;);
    }
  }
}

Now it shows it has updated all nodes. Here is screen shot for this :

Now when I click any node the update does not show.
Please take a look:

Does anybody have any ideas about this?
I have even tried clearing the cache.
Thanks
I got the solution: If the node doesn't change, don't create a new revision.