Running a single command on every machine in the pool can be accomplished by submitting a set of HTCondor jobs using a single submit description file of the following form:

executable = X
requirements = == MY.TargetSlot

+TargetSlot = "slot1@machine1"

+TargetSlot = "slot1@machine2"

+TargetSlot = "slot1@machine3"


There will be one +TargetSlot and one queue command for each machine in the pool.

A list of machine names for all machines in the pool may be obtained using the condor_status command:

condor_status -constraint 'SlotID==1' -format "%s\n" Name

And, you can have HTCondor do most of the work for you in generating the above submit file:

> cat <<EOF > runit.sub
universe = vanilla
executable = X
requirements = == MY.TargetSlot


> condor_status -constraint 'SlotID==1' -format '+TargetSlot = "%s"\nqueue\n\n' Name >> runit.sub


If you are ok with different clusters for each job -

$ cat do_cmd.sub
cmd = da_cmd
requirements = TARGET.SlotId == 1 && TARGET.Machine == "$(machine)"
$ for m in $(condor_status -master); do condor_submit -a machine=$m do_cmd.sub; done

If you want it in a single cluster -


cmd=$1; shift

 echo "cmd = $cmd"
 echo "args = $args"
 echo "requirements = TARGET.SlotId == 1 && TARGET.Machine == My.TargetMachine"
 for machine in $(condor_status -master); do
    echo "+TargetMachine = \"$machine\""
    echo "queue"
) | condor_submit