Added setting maximum number of CPUs to chedule