Changing the status of job success to force complete the job.
search cancel

Changing the status of job success to force complete the job.

book

Article ID: 411611

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

This document clarifies the behavior of AutoSys when a job's status is manually changed from RUNNING to SUCCESS via the sendevent command, specifically addressing its impact on any active child processes. It outlines the correct procedure for ensuring complete process termination.
A user manually changes an AutoSys job's status from RUNNING to SUCCESS using sendevent, expecting that this action will terminate all associated  processes, including any child processes spawned by the job's script or command. However, observation reveals that child processes continue to execute on the host machine.

Environment

WAAE 12.1, 12.1 SP1, 24.0, 24.1

Cause

The sendevent -E CHANGE_STATUS -s SUCCESS -J <job_name> command (or equivalent API call) primarily instructs the Autosys scheduler to update its internal DB record of the job's state.

This action does not interact with the Autosys Agent on the host machine to send termination signals to any active processes associated with the job's execution.
When a job's script or executable spawns child processes, the Autosys Agent typically monitors only the parent process it directly launched. Manually setting the job's status to SUCCESS effectively tells the scheduler that the job is done, but it does not instruct the agent to intervene at the operating system level to stop any currently running processes, parent or child.

Resolution

To ensure that all processes (parent and child) associated with an actively running Autosys job are properly terminated at the operating system level, the KILLJOB event must be issued.

Procedure:

1. Identify the job that needs to be terminated.
2. Issue the KILLJOB event using the sendevent command:

sendevent -E KILLJOB -J <job_name>


Note: Replace <job_name> with the actual name of the Autosys job.