Result check ignored if task goes over schedule period turnaround
search cancel

Result check ignored if task goes over schedule period turnaround

book

Article ID: 115197

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

A long running job that fails after the Schedule (JSCH) period turnaround does not have it's result check evaluated and the parent monitor shows the task in an active status.

This can be seen with the following example:

  • A job that runs for over an hour on the OS (like a sleep 3600) or target system (for example, an SAP or PeopleSoft job running for over an hour is put into a schedule and given a start time of 11:50 PM
  • The properties on this task in the schedule has a Result check of ANY_OK else Execute another object if the tasks ends with another status and an executable object is chosen
  • The period turnaround for the schedule is midnight (12:00 AM)
  • The job executes at 11:50 PM and finishes at 12:50 AM

  • When the job finishes, if it finished ENDED_NOT_OKAY, no call object is executed and the task still shows as Active in the schedule monitor

 

Environment

Release: 12.x, 21.x

Cause

The behavior is by design.  When the period turnaround (midnight by default) comes about, the current instance/task of the schedule ends itself and creates a new instance of itself.  When it does this, any child task (like the one described above) that is still running will continue to run, but the schedule will no longer take action on that task.  If a task passes the period turnaround, the result evaluation is no longer triggered.

Resolution

This behavior is described in the documentation under the Special Case: A Task Is Still Running After the Period Turnaround heading: 

You have probably defined the task start times in a way that they do not collide with period turnarounds. However, if that happens, this is how the tasks and the Schedule behave:

    • The task continues its execution. The instance of the Schedule that started the task has no longer control over it.

The Schedule no longer having control over the task includes not running result checks against the task.  This is behavior as designed as the the schedule creates a new instance of itself at period turnaround (which is not the parent object for a running task) and the old instance of the schedule is no longer active.  

We will update the documentation in the future to make it clearer that Result checks are not executed when a task from the previous day is still active after period turnaround.

Some other ways to achieve something happening due to the result of a task that runs over period turnaround in a schedule could include:

  • Encapsulate the job in a workflow and use the workflow's post conditions.
  • Create a script that contains an Include in the Post-processing tab of the jobs to check for the status and use the script functions, GET_UC_OBJECT_STATUS and ACTIVATE_UC_OBJECT.
  • Use the Runtime tab of the job itself and define an acceptable return code or else run another task


  • Use an Output-Scan and FILTER object to filter for specific keywords in the job report and execute another task as a result
    More info on Output-Scan can be found here and FILTER objects can be found here 
  • Use the PREP_PROCESS_REPORT script function to process through the report to find specific strings and take actions on those.  More info can be found here.

Additional Information

The schedule continuing to have control over as task that runs of period turnaround could be added in a future release and we'd encourage putting in an idea into our ideation system: https://community.broadcom.com/ideation/allideas?Page=1&CategoryKeys=1e4ef0d7-da0d-4d8b-9139-87c7105799c8&StatusKeys=&Sort=MostRecent so that our Product Management team is aware of the need and others in our community can add in their thoughts as well