AutoSys Workload Automation

Expand all | Collapse all

Timing of "At job run time" javascript

  • 1.  Timing of "At job run time" javascript

    Posted 04-04-2019 02:27 PM

    A member of our team remembers running into a problem in the past, and we are unsure if this is an issue that still exists.

     

    Jobs A through E are requests jobs.  Job A has javascript that requests jobs B through E.  In this way, if job A is requested the entire stream will be requested.

     

    The issue my coworker remembers is this:

    Job A is requested during the day and runs in the night.

    Upon completion, Job A runs the javascript to request B through E, but this does not complete before B became eligible and had already bypassed.

     

    As a result of this we have in some cases put a link with a 1 minute delay between jobs that request other jobs.  I'm not sure this is still a potential issue or if my coworker is being paranoid.

     

    Has anyone else ever had this happen?  Does "At job run time" mean the javacript is executed in parallel to the job?

     

    Also, if a job fails and is resubmitted, does the "At job run time" javascript execute again?



  • 2.  Re: Timing of "At job run time" javascript

    Broadcom Employee
    Posted 04-08-2019 10:34 AM

    The "At job run time" javascript implies that the javascript is executed when the job is ready to run.

    If the job fails and is resubmitted, the "At job run time" javascript script runs again when the job is ready to run.

    On the request jobs issue, you can use a task instead of a link after job A. When job A completes, the task executes a javascript at run time to request job B through E and completes itself using the execCommand function. This allows job B through E to run.

     

    Hope this helps.