You can use another Jobs run in another agent that active right after the main jobs (jobs that you want to cancel manually when Waiting for host status appear) active.
As you can see in the images, I use JOBS.WIN.NEW.4 to monitor JOBS.WIN.NEW.5.
- Put a script to active Jobs4 at the end of Jobs5 process
- Put in Jobs4 wait command for amount of time
- Put in Jobs4 post process the scripts that monitoring the Jobs5 status, and cancel Jobs5 when it has "waiting for host" status.
You can use a set of SQL VARA and a script object to perform cancel action. You can run the script every time you have "Waiting for host" job.
The SQL VARA statement is:
select EH_Ah_Idnr from EH where EH_status='1696'
The Script content is:
! : SET &VALUE# = GET_PROCESS_LINE(&HND#,2)
:PRINT "&VK# &ACTION#"