Hook issue trying to run OS commands on compute nodes

I would like to run an OS command on EACH compute node just before user’s job starts. Need the command to run with root privileges.

I have a hook written that seems to work fine, but it only runs the commands on the first node, the OS commands never run on the other compute nodes.

I’m sure this is something easy!

This is on redhat 7 if that helps at all.

You should set your hook to run at the execjob_prologue event, and set the user as pbsadmin.