ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.
Job Command Fails In AutoSys But Works From Command Line
book
Article ID: 145795
calendar_today
Updated On:
Products
CA Workload Automation AE - Scheduler (AutoSys)CA Workload Automation AE
Issue/Introduction
When we run a command job to run a shell script the job fails with error.
We run the same script manually, the script runs successfully.
Environment
Release : 11.3.6
Component : CA Workload Automation AE (AutoSys)
Resolution
When you can run the shell script by the "same user" and on the "same Agent",
then the encountered problem is related to the "job environment" being different from the "interactive environment".
The recommended solution is to proceed by the following steps to address the encountered issue:
1. Login as the "job owner" on the same "Agent machine" where the shell script needs to run
2. Run the shell script manually to make sure it works fine
3. Run a test job with exactly the same job definition as the job you need to run with a few changes as below:
The command will need to be modified to "set" if the Agent is on Windows, "env" if the Agent is on Linux/Unix.
The job name will be modified to a different name
The output of the command ("set" or "env") will be sent to the std_out_file of the job