'Update Resource Capacity' on resource group times outIssue When Updating Resource Capacity of a particular group, the transaction required may be very large and thus time out. This KB discusses the OOB included Scheduled Job (sysauto) 'Update resource capacity' ReleaseOrlando+CauseAs noted above, a group capacity update, especially over a large quantity of time, will require a very large transaction, updating thousands of resource_aggregate_daily+ records. OOB, a Scheduled Job(sysauto) called 'Update resource capacity' - OOB set to Active=false - may be used in order to run a background job which will update resource capacity based on groups added to the job. *Configuration required. OOB, the code for this scheduled job is: // Clone this schedule job to run separately for different groups at different times// One of the following values// ResourceConstants.NEXT_MONTH// ResourceConstants.NEXT_QUARTER// ResourceConstants.NEXT_YEARvar runFor = ResourceConstants.NEXT_YEAR;// Comma separated group sys ids or group names. Capacity and availability will be updated for users with pps_resource role in the given groups.var includeGroups = [];var excludeGroups = [];var generator = new ResourceCapacityGenerator();generator.run(runFor, includeGroups, excludeGroups);ResolutionWhen configuring this Scheduled Job, the first aspect to configure is which Groups the script will include when updating Capacity. This is configured by adding the group sys_ids to the Array Variable 'includeGroups' (i.e.: var includeGroups = [1234567896839469734];). Note: as mentioned in the script, comma separation is possible.When considering the WHEN aspect of this Job, look at the variable runFor. The commented-out settings refer to class configuration in the ResourceConstants Script Include. If you would like to update Capacity for all time for a group or groups, you may remove the entire variable with the below steps: (To remove the runFor variable) Comment out line 7 (var runFor = ResourceConstants.NEXT_YEAR;)In Line 14, remove the runFor variable (remove: runFor, ) Make sure to set this Job to Active=True and use the 'Execute Now' action to run the script. Once completed, you may deactivate this Scheduled Job (active=false)