Skip to main content

Resources

JAMS Resources are powerful tools that can help you allocate how batch Jobs are run. Resources let you define the necessary requirements (weight) for all Jobs, allowing JAMS to determine which Jobs can or cannot run concurrently. You can also use Resources to create maintenance windows that will prevent Jobs from running for a specified time. This is helpful during upgrades or maintenance activities, such as moving the JAMS Scheduler or backing up the database.

Resources can be assigned to Folders and Jobs. The Resource is defined by setting a specific quantity. Jobs will then use a portion of this quantity when they run. If you assign the Resource at the Folder level, all Jobs within the Folder will inherit the Resource setting.

Determining the Resource Quantity to Assign

When manually modifying Resources, how do you know how much or how little to assign to a particular Job? JAMS provides several ways to determine if a Resource is working above or below its effective allocation.

View the Quantity Available Column

To see what Resources are currently active, open the Resources screen and view the Quantity Available field.

Access the Monitor

Open the Monitor to view the status of all Jobs. If a Job has stalled or displays a ‘Waiting for Resources’ description, consider adjusting the Resource allocation.

Run a Script

You can run the following PowerShell script to return the quantity of Resources that are currently in use.

#### Report Resource Usage
Import-Module JAMS
$JAMSServer = "localhost"
$JAMSDefaultServer = $JAMSServer
New-PSDrive JD JAMS $JAMSServer -ErrorAction SilentlyContinue

$jamsentries = get-jamsentry -server $JAMSServer
$EntryReport= @()
$ResourceReport= @()

foreach ($jamsentry in $jamsentries){
$entry=get-jamsentry $jamsentry.jamsentry
$resourcerequirements = $entry.Elements | where-object {($_ -is [MVPSI.JAMS.ResourceRequirement])}
foreach ($resourcerequirement in $resourcerequirements){
write-output "$($entry.jamsentry) $($entry.Name) $($entry.CurrentState) $($ResourceRequirement.ResourceName) $($ResourceRequirement.QuantityRequired) $($ResourceRequirement.ElementState)"
$out = New-Object psobject
$out | Add-Member noteproperty Entry-Entry $($entry.jamsentry)
$out | Add-Member noteproperty Entry-Name $($entry.Name)
$out | Add-Member noteproperty Entry-ResourceName $($ResourceRequirement.ResourceName)
$out | Add-Member noteproperty Entry-QuantityRequired $($ResourceRequirement.QuantityRequired)
$out | Add-Member noteproperty Entry-ElementState $($ResourceRequirement.ElementState)
$EntryReport += $out
}
}

$EntryReport | ft

write-output "`n*** Resources ***"
$resources = Get-Childitem -Path JD:\Resources
foreach ($resource in $resources) {
$out = New-Object psobject
$out | Add-Member noteproperty Resource-Name $($resource.Name)
$out | Add-Member noteproperty Resource-QuantityAvailable $($resource.QuantityAvailable)
$out | Add-Member noteproperty Resource-QuantityInUse $($resource.QuantityInUse)
$ResourceReport += $out
}

$ResourceReport | ft

Resource Allocation

JAMS will automatically control how each Job acquires and releases the Resources assigned to them. Before a Job runs, JAMS compares the available Resource pool with the quantity required by the Job. If the available Resources exceed the required amount by the Job, the Job will execute. When the Job is completed, the Resources are released and added back to the available Resource pool.

The Resource quantity available can be manually increased or decreased at any time. You can make the modifications in one place, the Resource Definition, and it is available to all Jobs that need it.

As your batch processes move from one operating system to another, JAMS continues to enforce the assigned Resources requirements.

Resource Behavior

Resources have some unique characteristics that are listed below:

  • Jobs inherit the Resources that have been defined in their respective Folders.
  • Jobs can reduce or increase the inherited Resource requirements.
  • Jobs can add their own Resource requirements.
  • Sufficient Resources must be available for a Job to run.
  • Resources can be specific to an Agent or server.
  • Resources can be used on any operating system that is supported by JAMS.
  • The available Resource quantity can be increased or decreased at any time.
  • Requirements for different Resources can be added to the same Folder or Job.

Resources Screen

The Resources screen lets you view all existing Resources, create new Resources, and modify existing Resources. Each Resource displays the following:

  • Resource Name – The name to identify a Resource.
  • Description – The description to provide more information about the Resource.
  • Quantity Available – The number of Resources that are currently available.
  • Agent Specific – A checkmark is displayed if the Resource has been assigned to a specific Agent.
  • Last Change UTC – The date and time the Resource was last modified.

Adding a Resource

You can create a Resource definition to use with your Jobs. When you create the Resource, you have full access to it. If you want others to be able to modify or create a Job with that resource requirement, ensure the Security settings are configured properly for that user. However, users do not need permissions on a Resource to create/update a Job in a Folder that inherits the Resource requirement from a parent Folder.

  1. Click Execution from the main menu.

  2. Click Resources.

  3. Click Add.

  4. In the Resource Name field, enter a name for the Resource.

  5. In the Quantity Available field, enter a quantity for the Resource.

  6. Click Save and Continue to Edit.

  7. Click the Security tab to select the access level for the Resource for any other users who will modify the Resource or reference the Resource in their Jobs.

  8. Click the Available tab.

  9. In the Quantity Available field, enter the quantity for this Resource.

  10. To set the Resource to be used with only a specific Agent, do the following:

    1. Select the Agent Specific checkbox.
    2. To add the Agent, click in the field under Agent Name and select the Agent.
    3. In the Qty Available field, enter the Resource quantity for the Agent.
  11. Click Save.

Modifying a Resource

You can modify a Resource by changing its name, description, quantity available, and security settings. You can also add or remove Resource requirements from an Agent.

  1. Click Execution from the main menu.

  2. Click Resources.

  3. Click a Resource and select Properties.

  4. Click the Summary tab to change the name or description of the Resource.

  5. Click the Security tab to select the access level for the Resource for any other users who will modify the Resource or reference the Resource in their Jobs.

  6. Click the Available tab to do the following:

    1. Modify the Quantity Available for the Resource.
    2. Add, delete, or modify the Agent names that will have Resource requirements. See the section below for details.
  7. Click Save.

For a complete listing and description of each Resource property, see the sections below.

Deleting a Resource

Before deleting a Resource, ensure all Job and Folders that currently use it have been updated to remove references to it. To view where it is referenced, click the Resource, select Properties, and then select the References tab.

  1. Click Execution from the main menu.
  2. Click Resources.
  3. Click a Resource and select Delete.
  4. Click Delete.
note

You must have the proper level of access to the Resource Definition to add or delete a Resource.

Resource Requirements for Agents

Adding a Resource requirement to an Agent is optional. When you add a Resource requirement to an Agent, a set number of Resources from the Resource pool is available for Jobs that run on the Agent. This is useful when you want to restrict the number of Jobs that will run on one Agent as compared to another Agent. If an Agent has a lower load capacity than another Agent, enter a lower quantity on that Agent and a higher quantity on the Agent with a greater load capacity. JAMS will check the available Resources on the Agent before the Job runs.

If no Resource requirement has been added to an Agent, Jobs will use the Resources that have been allocated to the Resource pool.

Adding a Resource Requirement to an Agent

  1. Click Execution from the main menu.
  2. Click Resources.
  3. Click a Resource and select Properties.
  4. Click the Available tab.
  5. Under Agent Details, select the Agent Specific checkbox.
  6. Under Agent Name, click the row to select an Agent.
  7. Under Qty Available, enter the quantity of Resources that are available to that Agent.
  8. Click Save.

Deleting a Resource Requirement from an Agent

  1. Click Execution from the main menu.
  2. Click Resources.
  3. Click a Resource and select Properties.
  4. Click the Available tab.
  5. Under Action, click in the row for the Agent to be removed.
  6. Click Save.

Resource Properties

Summary TabDescription
Resource NameThis property is the unique identifier for the Resource.
DescriptionThe Description property can provide a more detailed explanation for the Resource.
Last ChangedThe Last Change property displays the date and time the Resource was last modified.
Security TabDescription
Access Control EntriesThe Security tab defines the level of access for this Resource. This is an Access Control List with one-to-many Access Control Entries (ACE). Each ACE can specify the following rights:
  • Acquire: users can obtain a portion or all the Resource's quantity allocation.
  • Change: users can modify this Resource if they have Change access in Resource Definitions.
  • Control: users can modify the Resource’s Access Control List.
  • Delete: users can delete the Resource if they have Delete access for Resource Definitions.
  • Inquire: users can inquire into the Resource if they have Inquire access to Resource Definitions.
Available TabDescription
Quantity AvailableThis property shows the available quantity for the current Resource.
Agent SpecificIf this checkbox is selected, this property measures the Resource by Agent. If this checkbox is cleared, the Resource is defined by the original quantity available.
Agent NameThis property displays the name of the Agent or Agents.
Qty AvailableThis displays the available Resource quantity for the specific Agent.
References TabDescription
ReferencesThe References tab lets you view where the Resource is referenced within JAMS.