AutoSys Workload Automation

 View Only
  • 1.  Queries on Job

    Posted Aug 27, 2020 03:41 PM
    Hello All , 

    We have two files (each file) placed in different folder .

    Scenario 1: If the two files arrives at different location but at same timestamp . The JOB (A) should trigger , Job (B) should wait till Job(A) Completes

    Scenario 2: If the first file is arrived early JOB(A) should trigger and JOB(B) should wait till JOB(A) completes

    Scenario 3: If the second file is arrived early , JOB(B) should trigger first and JOB(A) should wait till JOB(B) completes. 


    Kindly provide a solution which can handle the three above scenarios. or the best approach to handle the above scenarios .

    ------------------------------
    Best Regards

    Raj
    ------------------------------


  • 2.  RE: Queries on Job

    Posted Sep 10, 2020 11:44 AM
    Hello Raj,
    To ensure they don't run simultaneously, add the "notrunning" condition on both jobs for the other.
    However, if both files arrive at the same time, there isn't much AutoSys can do about it as the filewatch jobs would run independently; if they both go to Success very close together there won't be much chance for the "notrunning" condition to take effect; I've seen this.
    You might set the watch_interval for file B to be longer than that for file A, so there is an improved chance that A is found before B.

    Regards,
    JoeP


  • 3.  RE: Queries on Job

    Posted Sep 14, 2020 12:11 PM
    you can play with workload balancing. 
    so that only one job runs at a rime .. and give jobA priority 1 and jobB priority 2


  • 4.  RE: Queries on Job
    Best Answer

    Broadcom Employee
    Posted Oct 06, 2020 04:30 PM
    Hi Raj,

    Another approach is to use resources.  You could create a renewable resource with a count of '1' and assign JobA and JobB to use '1'.  The first job that triggers based on your other conditions will get the resource and if the other file comes in, the other job will go into a resource wait state until the first job completes and releases the resource and then start.

    Here is a link that has some examples and explanation for the different options: https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/workload-automation-ae-and-workload-control-center/11-3-6-SP8/scheduling/ae-scheduling/manage-resources/define-virtual-resource-types.html#concept.dita_4e21d64bc16e7604d6ead012467e580c58b33dfe_DefineRenewableResources

    Regards,
    Mike