Allowing a Job to Specify Thread Pool
  • 31 Dec 2020
  • 2 Minutes to read
  • Dark
    Light

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 does 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. 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 Folder in the Portal. Then, click NEW AD SYNC JOB from the top Action bar.
  2. Create an Ad Sync Job with the Scheduled Job Name A, then select Specified Job Schedule from the Calendardropdown.
    1. Designate the Date, then click SAVE.
    2. Repeat the NEW AD SYNC JOB process four more times, providing the names B, C, D, and E. 
  3. Jobs A ad B are going to be in the Default Queue Pool.

    Right-click Job C and select Edit Scheduled Job

    1. Scroll down to ADVANCED > Values and in enter My Queue Y into Override Job Queue Name, then click OK to save. 

  4. Repeat this process for Job D, being sure to specify Override Job Queue Name as My Queue Y; click OK to save. 

  5. Edit Job E this time specifying the Override Job Queue Name value as My Queue Z, then click OK to save. 

    If all these jobs are scheduled to start at 5 PM, three of the five jobs (Job A, Job C, and Job E ) will actually start at that time because the jobs are in three separate queues (Default pool, My Queue Y and My Queue Z).

    Because Job A is in the same pool as Job B, Job B will not begin until Job A has completed. Because Job C is in the same pool as Job D, Job D will not begin until Job C has completed.

    However, Job C will begin at the scheduled time because it is in a different pool than Job A and Job B. Because Job E is in its own pool, it will start at the scheduled time regardless of which other jobs have also started at that time.





Was this article helpful?

What's Next