AutoSys Workload Automation

  • 1.  Auto Resubmit Failed jobs and only send notification on final failure

    Posted Jul 27, 2017 04:20 PM

    Hi

    We are currently at DE R12  SP1.  This month we changed a lot of jobs to use Auto Resubmit and only send Alert notification on the final failure. 

     

    What we would like to be able to tell is how many alerts for failed jobs this saved us.  I know I can get a failed jobs report for a time period which would include ALL failures for that time period including failures for jobs that were auto resubmitted.  That is all great but we want to know how many Alerts and problem tickets auto resubmitting saved.

     

    Does anyone have an idea on how to do this?

     

    Sharon



  • 2.  Re: Auto Resubmit Failed jobs and only send notification on final failure

    Posted Aug 02, 2017 12:25 PM

    There is the WOB._subcount built-on symbolic variable which accumulates the number of attempts to resubmit failed job; see if you could use it.

    For example, if you use the execTrigger() function in the javascript of the alert, you could use the WOB._subcount as a value to be passed with the APPL._user1 variable for the triggered event:

    execTrigger('SCHEDMASTER.TRIG_TEST','ADD','NOW','NOHOLD','%WOB._subcount','','','','');

     

    and then to use this value in invoked script or a batch to display the number of attempts the job was resubmitted (it would include the last one so for the 'auto resubmitting saved' you probably would subtract 1). 



  • 3.  Re: Auto Resubmit Failed jobs and only send notification on final failure

    Posted Aug 02, 2017 02:32 PM

    Thanks, I was looking for an overall number not per job but talking through this helped and I realized I have everything I needed.  we were already using the wob._subcount

     

    Alert

    execTrigger("ALERT.ZZAUTOCUT","add"," ","NOHOLD","%WOB._tag","SubCount-%(WOB._subcount)--%(APPL._name).%(APPL._gen).%(WOB._name).%(WOB._qualifier) --%(WOB._state)","%(WOB._LDATE) %WOB._LTIME","%WOB._agent" );

     

    I created this sql against history for the ZZAUTOCUT application that was triggered (since this only triggers if final resubmit fails)

    select WA.ESP_APPLICATION.APPL_NAME,WA.ESP_GENERIC_JOB.JOB_NAME,WA.ESP_GENERIC_JOB.SCRIPT,WA.ESP_GENERIC_JOB.ARGUMENT,WA.ESP_APPLICATION.START_DATE_TIME
    from WA.ESP_APPLICATION,WA.ESP_GENERIC_JOB
    where WA.ESP_APPLICATION.APPL_ID=WA.ESP_GENERIC_JOB.APPL_ID
    and WA.ESP_APPLICATION.APPL_NAME = 'ZZAUTOCUT' and (WA.ESP_GENERIC_JOB.ARGUMENT like '%-FAILED%' and to_char(WA.ESP_APPLICATION.START_DATE_TIME,'yymm')='1707');

    alert triggers

     

    Thanks

    sharon