Automic Workload Automation

  • 1.  How to cancel JOBS which in status Generating ?

    Posted Jul 06, 2017 04:37 AM
    Hello,

    We would like to cancel automatically JOBS which in status Generating so the JOBP will not be too much time in status active.
    The Option "Run time" is not working since the JOBS is not in Active status.
    Can someone give us an advice?

    Thanks,

    NirC


  • 2.  How to cancel JOBS which in status Generating ?

    Posted Jul 06, 2017 06:01 AM
    Hi Nir

    you could use cancel_uc_object after checking runid with a kind of watchdog script.

    I imagine:

    your jobs starts the watchdog script and sends the run ID of itself as parameter
    watchdog script waits XY minutes, weeks, decades, .... and checks status of the job, if its still "generating" it performs a cancel_uc_object.




  • 3.  How to cancel JOBS which in status Generating ?

    Posted Jul 09, 2017 02:01 AM
    Hi Wolfgang,

    Thank you for your response.
    We tried to execute script with 
    cancel_uc_object from the time checkpoint because this is the only tab that can be relevant to JOBS which in status generating and not active.y5g1u4c3kw1x.jpghttps://us.v-cdn.net/5019921/uploads/editor/zh/y5g1u4c3kw1x.jpg" width="747">
     but unfortunately it don't work when the JOBS is in JOBP, the cancel_uc_object make no effect on the JOBS.

    NirC



  • 4.  How to cancel JOBS which in status Generating ?

    Posted Jul 09, 2017 02:15 PM
    We tried to execute script with cancel_uc_object from the time checkpoint ...

    which object do you try to cancel? The WF or the JOBS?


  • 5.  How to cancel JOBS which in status Generating ?

    Posted Jul 10, 2017 12:43 AM
    we try to cancel JOBS which in JOBP..


  • 6.  How to cancel JOBS which in status Generating ?

    Posted Jul 10, 2017 03:07 AM
    This was a misunderstanding, I imagined - starting a Killer-script from PRE PROCESS of your JOBS
    here you should define the time how log the killer script should wait - and pass it to the script.

    e.g.
    in my example the "generating" state is simulated by the wait 180
    :SET &RET# = activate_uc_object(SCRI.KILLER)
    :P &RET#
    :WAIT 180
    :PRINT "END"



    and after a certain amount of time (30 in my example) the killer script gets active:

    :SET &PAR_RUN# = &$ACTIVATOR_RUNID#
    :WAIT 30
    :SET &RET# = CANCEL_UC_OBJECT(&PAR_RUN#)
    :PRINT "RET CANCEL: &RET#"










  • 7.  How to cancel JOBS which in status Generating ?

    Posted Jul 10, 2017 05:17 AM
    Hello Wolfgang,

    I tested the script and it's working when you execute the JOBS directly.
    but when the JOBS is running within a JOBP it tries to cancel the JOBS but it is stay in Generating
    I used the PREP_PROCESS command to simulate the Generating as it was the situation we encounter this problem

    thanks,
    Nir 


  • 8.  How to cancel JOBS which in status Generating ?

    Posted Jul 10, 2017 05:40 AM
    Hi

    Ah I see - thats because the JOBs is in state "ready for generation" and not "generating"

    In my test it worked, when checking our good old checkbox "gen@runtime" in the JOBs :-)


  • 9.  How to cancel JOBS which in status Generating ?

    Posted Jul 10, 2017 05:54 AM
    I tried it again, all components has "Generate at runtime" but it still not canceling the JOBS.
    this is what I run in the JOBS:
    :SET &RET# = activate_uc_object(SCRI.TASK_KILLER)
    :P &RET#
    :SET &HND# = PREP_PROCESS("NMORAD_WIN01","WINCMD","*","CMD=ping 127.0.0.1 -n 240","UC_LOGIN=LOGIN.NMORAD")
    :process &hnd#
    :  set &line# = get_process_line(&hnd#)
    :  p &line#
    :endprocess
    the SCRI.TASK_KILLER is the same as you suggested

    this is the screen shot from the activities:
    7k3ikquojgm4.jpghttps://us.v-cdn.net/5019921/uploads/editor/8c/7k3ikquojgm4.jpg" width="1351">

    thanks,
    Nir


  • 10.  How to cancel JOBS which in status Generating ?

    Posted Jul 10, 2017 06:22 AM
    Possibly the prep_process command causes this issue - it creates a fileevent job that could prevent the cancellation.
    => see the returncode of the cancel_uc.... script

    what happens, if you do a wait 180 instead of the prep_process?