Starting and Stopping a Queue

Stopping a queue prevents any jobs from being dispatched to the queue, after it is stopped. However, jobs will queue up (wait on the queue) when it is stopped. When the queue is started again, the waiting jobs will start to be dispatched.

 

When an Execution QueueClosed An Execution Queue identifies the system where a Job will run. The system is specified in the Execution Queue's Machine property. The system entered in this property must have an ActiveBatch Execution Agent installed on it. When a Job is associated to an Execution Queue, it will always run on the system specified in Machine property, unless a manual override is performed (for example, using an instance's "requeue" operation) is stopped, this means jobs will not be allowed to start execution when they are directly associated to the Execution Queue that is being stopped. If triggered, they will go into a "Waiting Queue Busy (Queue Closed/Stopped)" state until the Execution Queue is started. If job(s) are already executing, stopping an Execution Queue does not impact already running jobs - they will keep running until completion.

 

When a Generic QueueClosed A Generic Queue represents one or more Execution Queues. Each Execution Queue points to a system where ActiveBatch jobs run. Each system must have an ActiveBatch Execution Agent installed on it. When a Job that is associated to a Generic Queue is triggered, it will run on one of the Execution Queues that is a member of the Generic Queue. One of the key purposes of a Generic Queue is it supports Execution Agent high availability (active-active). Should one Agent and its assigned Execution Queue go offline for maintenance purposes or for unknown reasons, the surviving Execution Queue members of the Generic Queue can pick up the load. When a Job is associated to a Generic Queue, it means can run on more than one system - that is, it can run on members of the Generic Queue. On a per Job basis, you can set Job properties limiting the Execution Queue members the Job can run on, if desired. is stopped, jobs that are triggered and associated with that queue will not be dispatched to any member Execution Queue(s). If triggered, jobs will go into a "Waiting Queue Busy" state until the Generic Queue is started. If job(s) are already executing on member Execution Queue(s), stopping a Generic Queue does not impact already running jobs - they will keep running until completion.

 

One of the advantages of associating jobs to a Generic Queue is if one of the member Execution Queues is stopped, the remaining member systems are still eligible to run the job when it triggers.

 

See the Queue's Stop menu option as depicted in the image below.

 

 

Use the Queue's Start menu option to start the Queue again. Normally when you start an Execution Queue, the execution machine will be up and available. If it isn’t (for example, the Execution Agent application isn't running), the Queue will enter a “Starting” state and remain in that state until the execution machine becomes available. Jobs are not dispatched to a Queue in a “Starting” state.

 

Start/Stop operation is an in-context operation. This means ActiveBatch will select the proper operation depending on the current state of the Queue (e.g. if it’s started, you can stop the Queue).

 

 

You can also automatically stop (and start) a Queue based on the Queue’s properties. The image above is taken from the Queue's Properties tab. This is especially useful when you know a machine won’t be available during certain hours. One drawback to the timed queue operations above is that, once set they are applied each day. A more beneficial solution might be to create and schedule a job with the following Jobs Library Job Step.

 

 

A complementary job could be scheduled at a later time to start the queue using the StartQueue Job Step. Next, while the queue in this example is hard-coded (Server1), you could use a variable. That would make the set of jobs generic and applicable for use everywhere in your system. The Job Scheduler property is identified using a built-in variable ${@JobScheduler}. This is recommended when you have a high availability solution for the Job Scheduler. The variable will resolve to the Scheduler that is currently up and running (i.e. the primary Scheduler).

 

To start or stop a Queue, you must have “Manage” access permission on the Queue object.