Trying to set something up so if a job is pending with a higher priority the current running job will request stop and start a new one to resume after the other takes priority.
With the get pending Jobs API call I’m trying to get what machine the pending job is allocated to but the HostName is always null so cant tell if its waiting for the current machine. Anyone ever found a work around?
This is in an estate with now 15ish processes, some need to run on specific machines at specific times, the requirement is to see if the machine the process is currently on is needed by a more urgent process, if so allow it through and add itself to start afterwards.
If priority in orchestrator was more flexible it could be achieved without needing this, I’m just confused why the Machine a pending item is assigned to isn’t exposed through the API using /odata/Jobs?expand=fields&$filter=State eq ‘Pending’.
The arguments are there, and in orchestrator you can see the machine and user mapping it is assigned to but not in the JSON.
I did think about trigger, but if there was more than 1 trigger for a job it complicates it, just don’t know why all the details aren’t exposed.
Very similar to how priority in there are I think or 10 levels ow, but the API only shows low medium and high. They need to flesh the get jobs out a little
if you are using API’s to start jobs, JobPriority will set you up with Low Medium and High, but you can ignore parsing this parameter completely and in this scenario it will inherit the priority you set up in the orchestrator.