Automic Workload Automation

Expand all | Collapse all

How do I check if a job was cancelled due to exceeded max. runtime in Post-Conditions?

  • 1.  How do I check if a job was cancelled due to exceeded max. runtime in Post-Conditions?

    Posted Feb 06, 2019 10:32 AM

    Hello!

     

    I'm using ONE Automation 2015 - Automation Engine 11.

     

    My goal is to use Post Conditions to automatically restart jobs, and I want all of the automatic restarting of jobs handled in one place if possible.

     

    I have a workflow containing jobs.  In these jobs, I use the output scan to set different return codes based on why the job may have failed.  For example, if a connection times out, I check the return code in my post conditions and if it matches, I rerun the job.  I attached a screen shot below for reference.

     

    I also have cases where I want to cancel a job after it exceeds the maximum run time and restart it in the same fashion.  Is there a way to set the return code on a job that is cancelled due to the maximum runtime being exceeded?  I know I can cancel and execute the job again from the Runtime tab, but if possible, I would like to do it in Post Conditions as I want to handle all of the automatic rerunning in one place.

     

    Thank you!

     

    Screen shot for reference:



  • 2.  Re: How do I check if a job was cancelled due to exceeded max. runtime in Post-Conditions?

    Posted Feb 12, 2019 06:56 AM

    Hi

     

    what about an else-clause like below - just an idea...

    At Workflow start I define a Threshold timestamp to compare with in postcondition.

     

    :SET &WF_START# = &$PHYS_TIME_HHMMSS#
    : P "WF_Start: &WF_START#"
    !Create Threshold to check against
    :SET &THRESHOLD# = ADD_TIME("HHMMSS;&WF_START#","HHMMSS;000300")
    : P "Threshold: &THRESHOLD#"

     

    cheers, Wolfgang