Allowing a Job to Specify Thread Pool
  • 27 Jul 2022
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Allowing a Job to Specify Thread Pool

  • Dark
    Light

Article summary

Overview

By default, the job scheduler runs all jobs in the same queue. This means that only one job will run at a time. For example, if Job A is scheduled to run at 5:00 PM and Job B is scheduled to run at 5:10 PM, but Job A takes 20 minutes to complete, Job B will not actually begin running until 5:20 AM because it could not start until Job A had completed. The job scheduler works like this to protect the server from being inundated by too many jobs running at once. However, in some cases a user may want to override this default behavior and allow a job to run in a separate job queue, thus allowing it to run in parallel with other jobs.

Example
There are many different types of jobs but all have the same option for configuring Queue Name. This setting is the same regardless of job type and this example will show how to change the Queue Name option on the Job Settings page. We will create five jobs to fully illustrate how to use Job Queues and configure their Queue names as follows.

  1. Navigate to the System > Jobs and Events > Scheduled Jobs. Click NEW AD SYNC JOB.

  2. In the Scheduled Job Name field, enter "Example A" and set the Calendar field to Last Day Of Month Schedule. Click OK. Repeat this process to create four more Ad Sync Jobs (Example B, Example C, Example D, Example E).
  3. Example A and B will be in a Default Queue Pool. Right-click Example C and select Edit Scheduled Job.
     
  4. In the Edit Scheduled Job window under the Advanced category, enter "My Queue Y" in the Override Job Queue Name field. Click OK. Repeat this process for Example D.
  5. Right-click Example E and select Edit Scheduled Job. In the Edit Scheduled Job window under the Advanced category, enter "My Queue Z" in the Override Job Queue Name field. Click OK.

    If all these jobs are scheduled to start at 5 PM, three of the five jobs (Example A, C, and E)  will actually start at that time because the jobs are in three different queues (Default Pool, My Queue Y, and My Queue Z). Because Example B is in the same pool as Example A, it will not begin until Example A has been completed. Example D will follow this same method for when Example C is completed because it is in the same pool.  However, Example C will begin at the scheduled time because it is in a different pool than Example A and B. Since Example E is in its own pool, it will start at the scheduled time regardless of which other jobs have also started at that time.

For further information on Administration, visit the Decisions Forum.

Was this article helpful?

What's Next