Call to undefined function node_mass_update()
The solution for this problem is to include the node.admin.inc file.   

 module_load_include('inc', 'node', 'node.admin');
 node_mass_update($nodes,array(array('status' =&gt; 0)));