Jobs Running Simple O/S Command Fail Immediately With Exit 1
search cancel

Jobs Running Simple O/S Command Fail Immediately With Exit 1

book

Article ID: 115172

calendar_today

Updated On:

Products

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

Issue/Introduction

Jobs that run only a simple O/S command, such as 'ls', fail immediately with an exit code 1. The std_out/std_err files are created but are empty.

Environment

Release:
Component: ATSYS

Cause

SomeĀ user's login profiles contain elements that do not work properly when the agent attempts to run a job as that user. For example, the login profile will call an interactive menu upon login. In these situations, the agent will fail the job with an exit code 1, but it is actually failing while sourcing the user's login profile.

Resolution

The recommended resolution is to configure the agent to where it does not source the job owner's login profile. If there are variables in the profile that are required for the job to run properly, create a separate profile that can be referenced in the job's "profile" attribute.

To configure the agent where it will not source the user's login profile, make sure the following parameters are set in the agenparm.txt file...

oscomponent.noforceprofile=true
oscomponent.cmdprefix.force=true
oscomponent.profiles.src.delay=true
oscomponent.profiles.src.order.global.first=true
oscomponent.profiles.src.verify=true

NOTE: These parameter values are automatically set when the agent is installed and the "Legacy Agent Compatibility" option is chosen.