AutoSys Workload Automation

 View Only
  • 1.  WOB End Date Time Variable?

    Posted Jan 03, 2018 11:30 AM

    I haven't had to do a whole lot of scripting myself so I'm not exactly too familiar with this and not sure if this can be done. Referring to DE 11.3.3 is there a end date time variable for a job? I'm seeing symbolic variables for the WOB start date and time but what about for the end date time? If not is there a way to create one? 



  • 2.  Re: WOB End Date Time Variable?

    Posted Jan 03, 2018 02:53 PM

    Hi,

    my thoughts is a WOB variable is resolved when a job submit so it would be unable to resolve an end time when the job submits.

     

    same applies to DATE or TIME

    %APPL._SDATE = scheduled date of application

    %APPL._ADATE = actual start date of application

    %APPL._RDATE = runtime start date of application

    %WOB._RDATE = runtime start date of WOB

     

    Sharon



  • 3.  Re: WOB End Date Time Variable?

    Posted Jan 08, 2018 10:30 AM

    Hey Sharon! Hope you have been doing well sine CA World. Your statement does make sense but I will try to pursue Dons comments below and see if I can somewhere with that. What we have now is when a job fails it triggers an event which ultimately creates a ticket with the failed job information but the time that is in the ticket is the start time of the failed job and not the end time, probably for the reason that you stated. Thanks for the information!

     

    Travis 



  • 4.  Re: WOB End Date Time Variable?

    Posted Jan 08, 2018 10:41 AM

    Hi Travis,

    I am doing well, hope all is well with you too.

     

    What happens when your alert it triggered now?

     

    We do trigger alerts when our jobs fail.  We created an alert that is added was added to all applications - notications - alert for failed, overdue and suberror.  So when a job fails the alert this alert is triggered, the alert runs this java script and triggers another application called ZZAUTOCUT, the script zzautocut runs pulls in all these as arguments.

    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" );



  • 5.  Re: WOB End Date Time Variable?

    Posted Jan 08, 2018 10:55 AM

    It seems to be doing much of what you are doing now. It will run javascript to pass a bunch of parms and to trigger another. that triggered application will take those parms to generate what information should be in the ticket. The variables that I see that we are using are listed below. So, does your ticket information include time of failure for the job? I would think users would want know the time a job failed, not the time the job started as what is happening in our situation.

     

    APPL._gen
    APPL._truser
    WOB._name
    WOB._qualifier
    WOB._agent
    WOB._state
    WOB._status
    WOB._type
    WOB._jobno
    WOB._cmpc
    WOB._RHH     WOB._RMN     WOB._RYEAR     WOB._RMMM     WOB._RDD
    WOB._tag



  • 6.  Re: WOB End Date Time Variable?

    Posted Jan 08, 2018 11:20 AM

    we are doing very similar things.  Yes we get time of failure by using WOB._LDATE and WOB._LTIME instead of RHH, RMN, RYEAR and RMMM and RDD.

     

    Failed job

    start  Sat 6 Jan 2018 06:10:05 CST

    end Sat 6 Jan 2018 06:10:06 CST

     

    autocut script passes

    "IM48562" "SubCount-3--AA_SEC.1022.PAAU600111.TERM_JOB --FAILED" "Saturday 6th Jan 2018  06.10.06" "UXPRD710"



  • 7.  Re: WOB End Date Time Variable?

    Posted Jan 08, 2018 02:40 PM

    I've adjusted our javascript to include the LDATE and LTIME and after removing a few others and testing, it seems to be working just fine. It blows my mind why this was ever setup this way. Previous way was no matter what, the start time of the job was always passed into the ticket.

     

    Thanks Sharon for sharing this, come work for us!



  • 8.  Re: WOB End Date Time Variable?

    Posted Jan 08, 2018 03:33 PM

     I would be warmer if I came to work with you! 

     

    Thanks for your info too, I realized we could add APPL._truser to our messages. 

     

    Have a Good Day

    Sharon



  • 9.  Re: WOB End Date Time Variable?
    Best Answer

    Posted Jan 04, 2018 09:37 AM

    Hi Travis, 

    Depending on what you are trying to accomplish, one of the options below may work for you. 

     

    Set up an alert when the job completes. It will trigger an event. Variables can be used to get the jobname and much more. The built in variables APPL._ADATE and APPL._TIME can be used to get the current time.  They will be within a second or two of the actual job end time. These variables can also be used to create a user defined variable with the end time. 

     

    OR

    Query the database for the job start and end time. With the variables from the ALERT the exact job information can be retrieved. This can be done using a script/job.  

     

    Let me know if I missed the boat. 

    2¢ 

    Don



  • 10.  Re: WOB End Date Time Variable?

    Posted Jan 08, 2018 10:27 AM

    Thank you Don for the information. I believe the first example is worth pursuing but is there somewhere in the manuals that help to explain how to do this or something I can refer to? If nothing readily available than I will turn to researching it and seeing if I can teach myself how to define it. Appreciate the time.

     

    Travis