Restrict multiple FORCE_STARTJOB events on jobs which are in RUNNING state
search cancel

Restrict multiple FORCE_STARTJOB events on jobs which are in RUNNING state

book

Article ID: 33546

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent

Issue/Introduction

The application users unintentionally submitting more than one FORCE_STARTJOB event on a job which is already running leading to duplicate execution of the jobs.

This technical document explains the necessary procedure to set up a global restriction on sending FORCE_STARTJOB events for jobs which are in STARTING, RUNNING, WAIT_REPLY, or SUSPENDED state.

Environment

Release: All Supported Versions
Component: Workload Automation AE (AutoSys Edition):

Cause

This often leads to a situation where multiple instances of the same job running simultaneously creating a huge business impact.

Resolution

The following environment variable on CA Workload Automation AE specifies that the scheduler restricts users from running multiple instances of a job while the job is in the STARTING, RUNNING, WAIT_REPLY, or SUSPENDED state.

RESTRICT_FORCE_STARTJOB=1

https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/autosys-workload-automation/12-1/administrating/ae-administration/configuring-ca-workload-automation-ae/environment-variables-scheduler.html  

 

On UNIX or Linux environments,

Export the variable at the operating system prompt. Restart AutoSys Scheduler and Application Server services.
 
 #RESTRICT_FORCE_STARTJOB=1; export RESTRICT_FORCE_STARTJOB

The same can be set in the file AutoSys environment file,  $AUTOUSER/autosys.sh.$HOSTNAME. This env script is called by the startup scripts for the Scheduler and Application server.

Setting the variable in this script ensures that it is always set every time those services are started.

 

On Windows, define the variable in CA Workload Automation Administrator utility.
(Windows) Manage System Environment Variables Using the Administrator Utility

A restart of both the scheduler, application server services is necessary to make the environment variable effective.

After setting up the variable, the attempt to FORCE_STARTJOB on a job that is already running,  would return the following message - 

CAUAJM_I_60001 Job (JobName) has already started. FORCE_STARTJOB has no effect.

Additional Information

Restrict the Runtime Behavior of Jobs