I have a primary agent that carries out builds, database refreshes and some ftp deployments, the last two jobs taking 5 mins each. To prevent too much queuing i have setup additional agents to carry out the refresh and ftp jobs, however i would like to cater for peak demand by having further agents pick up these jobs if they are idle, but not unless all the other agents are busy as it will block their main task, e.g. web deployment.
Therefore I think it would be useful to rank the agents assigned to a resource. Then agents pick up the job associated with the resource by descending rank, so the web deployment agent doesn't pick up a refresh job before the other higher ranked agents get allocated.