How to prevent a job from being stuck in status 'Waiting for host'

book

Article ID: 196483

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

The Automation Engine will check if the agent is active when a job is started . If the agent is not active the job will show as 'Waiting for host'. The job will keep this status until the agent is active again. This can cause some problems if you are evaluating the ending status of a job.

 

Resolution

The following script will check if the host is active and if not change the status to 'ENDED_NOT_OK - aborted'

:PSET &RETURN# = SYS_HOST_ALIVE(&$AGENT#)
:IF &RETURN# = 'N'
:  EXIT 1
:ENDIF