Why does a job status could change from TERMINATED to SUCCESS/FAILURE at a later time
search cancel

Why does a job status could change from TERMINATED to SUCCESS/FAILURE at a later time

book

Article ID: 425267

calendar_today

Updated On:

Products

Workload Automation Agent

Issue/Introduction

A user killed one of the processes associated to a file watcher job, that showed the status change on the job to TERMINATED, but later an hour or two later the job's status changed to SUCCESS.  Why?

 

Consider below example:

autorep -dJ test_fw

Job Name                                                         Last Start           Last End             ST/Ex Run/Ntry Pri/Xit
________________________________________________________________ ____________________ ____________________ _____ ________ _______
test_fw                                                          01/12/2026 12:28:10  -----                RU    25132/1         

  Status/[Event]                Time                 Ntry ES  ProcessTime           Machine
  ----------------------------  --------------------- --  --  --------------------- -------
  STARTING                      01/12/2026 12:28:10    1  PD  01/12/2026 12:28:10   agent.example.com
  RUNNING                       01/12/2026 12:28:10    1  PD  01/12/2026 12:28:11   agent.example.com
    <Monitored for CREATE>
  [CHK_TERM_RUNTIME]            01/12/2026 12:30:10    1  UP                               
    <Event was scheduled based on job definition.>

 

ps -few|grep watcher


autosys    46539     800  0 13:28 ?        00:00:00 /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT/cybspawn.bin 6 /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT 20260112 13281045+0500 WA_AGENT filemon#JavaAgent#tcpip@R12_SCH 7930.25132_1/WAAE_WF0.1/MAIN RUN DOTINTERNAL Data(Command="/opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT/filewatcher",Args="18:1_10000_true_30000 35:\"\"\"/tmp/cawa_installer.log\"\"\" 2:S0 6:CREATE 0: 0: 0: 5:30000 5:false ")  Env(AUTOSERV=R12,AUTO_JOB_NAME="test_fw",AUTORUN="25132-1") User(autosys) Password() MFUser(autosys) InternalCommand  GblEnv(AUTOSYS="/opt/CA/WorkloadAutomationAE/autosys",AUTOROOT="/opt/CA/WorkloadAutomationAE",EWAGLOBALPROFILE="/etc/auto.profile") MgrEnv(EWAGLOBALPROFILE="/etc/auto.profile") JLErase(TRUE) SpoolErase(TRUE) FilePermission(0644) CA3098C18D959984D6C503FE1A37DD0A04136CA7 /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT/cybAgent.bin 194c18 /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT/spool WA_AGENT 7520 /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT/security.txt - /usr/bin/sh,/bin/csh,/bin/ksh,/usr/bin/ksh,/bin/sh,/bin/bash - /bin/sh 256 USER_CONT_NOT_AVAIL - - su - -

autosys    46555   46540  0 13:28 ?        00:00:00 /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT/filewatcher 18:1_10000_true_30000 35:/tmp/cawa_installer.log 2:S0 6:CREATE 0: 0: 0: 5:30000 5:false

 

kill -9 46539

autorep -dJ test_fw

Job Name                                                         Last Start           Last End             ST/Ex Run/Ntry Pri/Xit
________________________________________________________________ ____________________ ____________________ _____ ________ _______
test_fw                                                          01/12/2026 12:28:10  01/12/2026 12:28:51  TE    25132/1  9      

  Status/[Event]                Time                 Ntry ES  ProcessTime           Machine
  ----------------------------  --------------------- --  --  --------------------- -------
  STARTING                      01/12/2026 12:28:10    1  PD  01/12/2026 12:28:10   agent.example.com
  RUNNING                       01/12/2026 12:28:10    1  PD  01/12/2026 12:28:11   agent.example.com
    <Monitored for CREATE>
  TERMINATED                    01/12/2026 12:28:51    1  PD  01/12/2026 12:28:51          
    <Aborted, Signal 9>
  [*** ALARM ***]
    JOBTERMINATED               01/12/2026 12:28:51    1  PD  01/12/2026 12:28:52   agent.example.com
  [CHK_TERM_RUNTIME]            01/12/2026 12:30:10    1  PD  01/12/2026 12:28:51          
    <Event was scheduled based on job definition.>

 

But after the watch_file_interval completes  as the file arrived properly, that completed fine and so the SUCCESS event shows up now.

 

autorep -dJ test_fw

Job Name                                                         Last Start           Last End             ST/Ex Run/Ntry Pri/Xit
________________________________________________________________ ____________________ ____________________ _____ ________ _______
test_fw                                                          01/12/2026 12:28:10  01/12/2026 12:30:10  SU    25132/1  0      

  Status/[Event]                Time                 Ntry ES  ProcessTime           Machine
  ----------------------------  --------------------- --  --  --------------------- -------
  STARTING                      01/12/2026 12:28:10    1  PD  01/12/2026 12:28:10   agent.example.com
  RUNNING                       01/12/2026 12:28:10    1  PD  01/12/2026 12:28:11   agent.example.com
    <Monitored for CREATE>
  TERMINATED                    01/12/2026 12:28:51    1  PD  01/12/2026 12:28:51          
    <Aborted, Signal 9>
  [*** ALARM ***]
    JOBTERMINATED               01/12/2026 12:28:51    1  PD  01/12/2026 12:28:52   agent.example.com
  [CHK_TERM_RUNTIME]            01/12/2026 12:30:10    1  PD  01/12/2026 12:28:51          
    <Event was scheduled based on job definition.>
  SUCCESS                       01/12/2026 12:30:10    1  PD  01/12/2026 12:30:10   agent.example.com
    <File Created, size 4, NoChange 0 min. Filename("/tmp/cawa_installer.log")>

 

Cause

Because the PID is being killed externally outside the realm of AutoSys,  and the whole process tree was not killed, when the file watcher does complete it's watching, it reported back that status back to AutoSys.

This is expected behavior.

Resolution

It is recommended to issue a KILLJOB against the job with in AutoSys.

If external kill needs to be done, kill the PGID associated to the file watcher process (which is usually the cybspawn process's PID). 

Example:

UID          PID    PPID    PGID     SID  C STIME TTY          TIME CMD
root     4052934       1 4052934 4052934  0  2025 ?        00:00:00 /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT/cybspa>
root     4052939 4052934 4052934 4052934  0  2025 ?        00:00:00 /bin/sh /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGEN>
root     4052977 4052939 4052934 4052934  0  2025 ?        00:00:40 /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT/filewa>