Setting Up a Queue
We will set up a queue named Inv_Weekly and give it a queue limit of three. The jobs in the Inventory Weekly group will run in this queue. The queue configuration parameters will single-thread (run one at a time) the jobs in the group.
To set up a queue:
-
Click Scheduling > Queues on the Navigation pane to display the Queues pane.
-
Right-click the System Queue and click Add Queue from the context menu to display the Queue Definition dialog.
-
Enter the name Inv_Weekly in the Queue Name field.
-
Leave System Queue in the Parent field. We defined Inv_Weekly as a direct sub-queue of the system queue in the queue hierarchy. This means there are no intermediate queues to impose their own restrictions and affect job execution.
-
Change the Limit value to 3. This allows a maximum of three jobs from this queue to run concurrently.
-
Change the Priority value to 60. Default queues have a priority setting of 50. Since default queues can accept the jobs that you created, this higher priority value will ensure that the jobs enter this queue. When the queue manager sees two or more queues that can accept a job, it always assigns the job to the queue with the highest priority.
-
Click Add on the Filters tab to display a list, and click Job Group. The Queue Filter Condition dialog appears.
-
Choose the Inventory Weekly job group.
-
Click OK. The filter is entered into the Filters tab. The Always option in the Hours Available section should be selected by default. This means that the Inv_Weekly queue can run at any time. If you de-select the Always option, you can restrict the queue to operate within a specific time window. Jobs assigned to the queue would then run only if the current time were within that time window.
-
Click OK. Inv_Weekly is added to the list of queues on your system.
Adding the Inventory Weekly Job Group to Production
Now, submit the group Inventory Weekly into the production schedule.
To submit the group into the production schedule:
-
Right-click the Inventory Weekly job group on the Jobs pane, and click Insert into Schedule from the context menu.
-
Click OK in the Insert Job Into Schedule dialog.
-
Click OK in the Information dialog.
Monitoring the Job Group in Production
To monitor the job group in production:
-
Click Operations > Job Activity on the Navigation pane to display the Job Activity pane. Your job group is listed in bold showing the Waiting On Operator status.
-
Right-click the Inventory Weekly job group and from the Job Control submenu and select Release/Resume to start the job group.
-
Click Yes in the Confirm dialog.
-
Click OK in the Information dialog.
Note: The Inventory Weekly job group goes active, along with the three jobs: Inventory_10, Inventory_11, and Inventory_12. Because the limit on the Inv_ Weekly queue is set to 3, all three jobs in the group Inventory Weekly are launched at once, and now run to completion.
-
Scroll to the right in the Jobs pane to view the Queue column. Note that the Inventory_10, Inventory_11 and Inventory_12 jobs are running from the Inv_Weekly queue.
Changing the Queue Limit
Changing the queue limit from any number to 1 changes the queue from multiple to single-threaded processing.
To change the queue limit:
-
Click Definitions > Queues on the Navigation pane to display the Queues pane.
-
Double-click the Inv_Weekly queue to display its definition dialog.
-
Lower the Limit from 3 to 1.
-
Click OK to save the changes. The limit change is displayed in the Queues pane.
-
Click OK in the Information dialog.
-
Click Operations > Job Activity on the Navigation pane to display the Job Activity pane. You can now see another occurrence of your job group and its jobs in the Job Activity pane.
-
Click the new occurrence of the Inventory Weekly job group.
-
Right-click the occurrence of the Inventory Weekly and click Job Control from the context menu.
-
Select the Release/Resume option.
-
Click Yes in the Confirm dialog.
-
Click OK in the Information dialog.
The Inventory Weekly job group goes active, and the jobs within the group run again in no particular order. This time, however, they run one at a time because their assigned Inv_Weekly queue has a limit of 1. While they are running, if you insert or rerun any other job on the schedule that belongs to a different queue, it runs immediately since it does not belong to the Inv_Weekly queue and is not restricted by its limit.