AutoSys Workload Automation

Expand all | Collapse all

Keeping a job active

  • 1.  Keeping a job active

    Posted Aug 01, 2016 06:00 PM

    Hi,

    I need to execute a job in my application every 30 minutes. I have scheduled in "run frecuency" the "every 30 minutes" statement, but when the application is run, the job is completed. So, how coud i keep this job active in order to execute an

    action every 30 minutes?. It is CAWA 13.3 DE

     

     

    Thanks a lot!



  • 2.  Re: Keeping a job active

    Posted Aug 02, 2016 12:29 AM

    Hi Isaac,

     

    I don't believe DE has a concept of cyclic job.  I will double check with our development team for the purpose of cyclic schedule at the job level.

     

    In simple terms, DE scheduling is based on events (can be cyclic) which trigger an application to run.  Each execution of an application run is called a generation.  Lastly, applications are containers for jobs.

     

    If possible isolate the job into a single application and have the event tigger every 30 minutes.  I realize this is not always possible.  In such cases, a combination of application redesign and the use of JavaScrip, alerts, and external jobs can  of help.

     

    If you are working with a CA services team they can point you in the right direction.  If you are performing this task on your own, we on the community can be of help.  Please provide additional details of your application so we can assist you further.

     

    Regards,

    Pradeepan Gunabalasingam



  • 3.  Re: Keeping a job active

    Posted Aug 02, 2016 09:04 AM

    Hi,

    Thanks a log for your help. When you said "i realize is not always

    possible" that means the cyclic app every 30 minutes scheduled will not

    work?.

     

    I nenes to trigger a Report every 30 minutes while an app is active. This

    report show the filetriggers jobs status. How could i do it?

     

    Thanks flor your support.

    Isaac

     

    El Tuesday, August 2, 2016, gunpr01 <communityadmin@communities-mail.ca.com>

    escribió:

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

    Keeping a job active

     

    reply from gunpr01

    <https://communities.ca.com/people/gunpr01?et=watches.email.thread> in *CA

    Workload Automation* - View the full discussion

    <https://communities.ca.com/message/241903077?et=watches.email.thread#comment-241903077>

     



  • 4.  Re: Keeping a job active
    Best Answer

    Posted Aug 03, 2016 12:09 PM

    Hi Isaac,

     

    Cyclic job every 30minutes will not work, but you can schedule in a new application generation every 30  minutes using event schedule of 'every 30 minutes'

     

    If the purpose of this job is to obtain the status of the file trigger job, why not setup notification at the file trigger job.  The status of the job will be communicated based on the state changes via alerts (java script), email or SNMP Traps.  It would also be best practice to specify time dependencies such that if a job goes past its expected run time, it can be marked as overdue.

     

     

    Let us know if this will work for you?  Also, what version of DE are you using?  R11.3 or R12?

     

    Regards,

    Pradeepan



  • 5.  Re: Keeping a job active

    Posted Aug 03, 2016 12:27 PM

    Hi Pradeepan,

    I am using DE 11.3, the thing is each file triggers detects an file which

    in turn represent an different office, then i need to count how many

    offices are pending. The client wants a report any 30 minutes where he can

    see offices pendings.

     

    I have all implemented, i only need to set a job which calls the report

    every 30 minutes.

     

    Regards,

    Isaac

     

    2016-08-03 12:09 GMT-04:00 gunpr01 <communityadmin@communities-mail.ca.com>:

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

    Keeping a job active

     

    reply from gunpr01

    <https://communities.ca.com/people/gunpr01?et=watches.email.thread> in *CA

    Workload Automation* - View the full discussion

    <https://communities.ca.com/message/241903642?et=watches.email.thread#comment-241903642>

     



  • 6.  Re: Keeping a job active

    Posted Aug 03, 2016 01:48 PM

    We are very heavy on interval jobs.  We do define ALL interval job and/or job flows in their own application and set the run statement on the application as run every x minutes.  The report you are running is it checking status of other file triggered and  active applications correct?  I think it is not applicable for the application of the report you want to run to stay active.  Let me know if I am wrong. 

     

    Sharon



  • 7.  Re: Keeping a job active

    Posted Aug 03, 2016 02:12 PM

    Hi Sharon,

    thanks for your help. The report works OK, it shows me the files triggers

    actives in my application. The problem is to execute the job, which trigger

    my report by using an event, each 30 minutes while the application is

    active, when it to be completed, the job does not execute anymore.

     

    Thanks,

    Isaac

     

    2016-08-03 13:49 GMT-04:00 shimaneks <communityadmin@communities-mail.ca.com

    >:

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

    Keeping a job active

     

    reply from shimaneks

    <https://communities.ca.com/people/shimaneks?et=watches.email.thread> in *CA

    Workload Automation* - View the full discussion

    <https://communities.ca.com/message/241903688?et=watches.email.thread#comment-241903688>

     



  • 8.  Re: Keeping a job active

    Posted Aug 03, 2016 02:28 PM

    I was thinking file triggers at an event level.  I get it now you have file monitors defined in the application.  So while the application is active you want to trigger the report every 30 minutes.

     

    Is the report an sql against dseries db to get file monitor status's?

     

    Something else to consider instead of a report but depends on what you do with the report.  I created a custom view that I keep open at all times to watch my file monitors, external same scheduler

     

    Sharon



  • 9.  Re: Keeping a job active

    Posted Aug 03, 2016 05:00 PM

    Hi Sharon,

    Exactly, that's it. I have built a report in BIRT where i execute a sql

    statement against CAWA database in order to obtain file triggers jobs

    actives. Now, i need to run a cyclic job every 30 minutes while this

    application keeps active. Is it possible suspend an event by execCommand or

    other sentence? because i can schedule an report event every 30 minutes,

    that works, but how could i suspend that event when my application is

    completed?

     

    Thanks,

    Isaac

     

    2016-08-03 14:30 GMT-04:00 shimaneks <communityadmin@communities-mail.ca.com

    >:

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

    Keeping a job active

     

    reply from shimaneks

    <https://communities.ca.com/people/shimaneks?et=watches.email.thread> in *CA

    Workload Automation* - View the full discussion

    <https://communities.ca.com/message/241903710?et=watches.email.thread#comment-241903710>

     



  • 10.  Re: Keeping a job active

    Posted Aug 04, 2016 09:31 AM

    There is a CLI command to suspend and resume events.  here is what I was thinking

    1. set up the report in an app by itself  (XX_REPORT)

        on event add a run statement of:  every 30 minutes

        in service suspend the event

     

    2. the application with your file monitors are, add 2 unix jobs (or what ever platform your dseries manager is on)

    1st job (no pred no time) would run ASAP after the application was triggered

    script:  /opt/dseries/WA/bin/cli

    arg:     UXUNT080 7500 ADMIN adminencryptedpassword 'resume event("DLY.XX_REPORT")'

     

    2nd job (needs to have preds of ALL jobs in the application) would run as soon as ALL jobs are complete

    script:  /opt/dseries/WA/bin/cli

    arg:     UXUNT080 7500 ADMIN adminencryptedpassword 'suspend event("DLY.XX_REPORT")'

     

    note your argument would be different

    server         port   ADMIN admin encrypted password

    UXUNT080 7500 ADMIN adminencryptedpassword



  • 11.  Re: Keeping a job active

    Posted Aug 04, 2016 12:47 PM

    I tested the above scenario in our dev env it works pretty good.  The only thing that didn't work is the ADMIN userid and admin encrypted password didn't have permissions to suspend and resume the event.

     

    I changed to SCHEDMASTER and encrypted that password and it works great.  the report only intervals while the application with the File monitors in it is active.

     

    Sharon



  • 12.  Re: Keeping a job active

    Posted Aug 04, 2016 03:50 PM

    Thank You Sharon for contributing to this thread.  My solution was going to be along the same lines of yours.  You beat me to it:)



  • 13.  Re: Keeping a job active



  • 14.  Re: Keeping a job active

    Broadcom Employee
    Posted Aug 03, 2016 02:14 PM
      |   view attached

    You can capture the status of the file triggers using a JavaScript in the Application. If you already implemented a solution and created a report, schedule the report every 30 minutes using Event with ‘result options’ to client.

     

    Segun



  • 15.  Re: Keeping a job active

    Posted Aug 03, 2016 05:29 PM

    To answer your question about keeping the Application open (not Complete), you only need one job in the Application to be in a non-Complete state.

     

    So a common technique is to put in a Link job and have a Do Not Submit Before time of when you want the Application to go complete.  So, if you want to trigger the Event for this Application every day at midnight, then put a Do Not Submit before time of 11:59 pm.  All job objects will go complete at that point.

     

    Segun's suggestion might be the best one if you upload the Birt report to the DE Reports Perspective.  Then you can schedule the Report in the Events Perspective with the run frequency of every 30 minutes.

     

    If you cause the report to run but end with a non-zero RC, then you can use the Auto Resubmit option to resubmit the job every 30 minutes 48 times.

     

    If the Report job ends with a RC=0, then you would need to trigger an Alert when the job completes.  Because you have a link in a TimeWait, you can run an execCommand to resubmit the job in 30 minutes.  You might have to trigger an Event with the Alert to trigger in Now plus 30 minutes and have a Link job in the Application that will issue the execCommand.

     

    I am not sure that I have any other real good way to wait for 30 minutes to issue a command.



  • 16.  Re: Keeping a job active