Hi,
We’ve been noticing that changing machine limits through scripts will change the apparent value on the job settings, but the job won’t pick up any additional jobs to match the machine limit even if the farm is empty. If I go in and change the job settings manually to that number (just increment up one, and then down one to the same value) the job will pick up machines to match the machine limit. Is there something wrong with my code?
def OffsetButtonPressed( *args ):
global scriptDialog
jobs = MonitorUtils.GetSelectedJobs()
offset = int( scriptDialog.GetValue( "OffsetBox" ) )
for job in jobs:
machineLimit = job.MachineLimit + offset
if machineLimit > 500:
machineLimit = 500
elif machineLimit < 0:
machineLimit = 0
job.MachineLimit = machineLimit
RepositoryUtils.SaveJob(job)
Thanks for the help!