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.

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


Article ID: 196483


Updated On:


CA Automic Workload Automation - Automation Engine


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.



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

:IF &RETURN# = 'N'
:  EXIT 1