Hi!
You can execute object tool via Java API or using nxshell (which is a Python wrapper around Java API). Approximate sequence will be following:
find cluster object (by name or ID)
for each child node object call NXCSession.executeAction
Here you can find more information about API:
http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations
https://www.netxms.org/documentation/javadoc/latest/
Best regards,
Victor