JobTemplate is a filterable property. You can use the example posted to your previous question here (http://social.microsoft.com/Forums/is/windowshpcdevs/thread/80a7d082-c94e-4b60-aaf8-4ef1b7acec1e) to
get the list of jobs for a given JobTemplate (instead of all running jobs). Simply change the filter from:
FilterProperty filStateRunning =
new
FilterProperty(FilterOperator.Equal,
JobPropertyIds.State,
JobState.Running);
filter.Add(filStateRunning);
to
FilterProperty
filDesiredJobTemplate = new
FilterProperty(FilterOperator.Equal,
JobPropertyIds.JobTemplate,
"JobTemplateNameHere");
filter.Add(filDesiredJobTemplate);
You
can then recraft the loops and collection to look at the job priority instead of the nodegroup.
For
busy clusters, there is a balance
between too few filter clauses and too many: Too few and the resulting collection may require moving a lot of data across the wire (and burden the Scheduler process with large data sets) and too many can result in excessive computation costs. The
actual limits depend entirely on the resources upon which your cluster is built: HN cpu, drive speeds, ram, the same for wherever SQL is running and average and peak HN loads.
d