Automic Workload Automation

 View Only

Expand all | Collapse all

Scheduling periodic tasks

  • 1.  Scheduling periodic tasks

    Posted Jul 14, 2023 03:48 AM

    I'm interested in scheduling a task (a workflow) to run every 15 minutes for the whole day - so, 96 times per day. I would like to find the best way to accomplish this.

    I can think of a few options:

    1. Add 96 entries for the workflow to a schedule (JSCH) object - one for each 15 minute time interval during the 24-hour day.
    2. Add a time event (EVNT_TIME) to the schedule object, and use ACTIVATE_UC_OBJECT in the event's Event Process (formerly !Process) tab to run the workflow.
    3. Create a period (PERIOD) object for the ever-fifteen-minutes interval, and use the Execute Recurring function to execute the workflow with this period.

    Option #1 seems tedious and inflexible, so I will eliminate it from consideration. 

    Option #3 seems to work only for manual executions, and what I want is to schedule the periodic executions, not run them manually.

    This seems to leave only option #2. Upon reflection, I find it surprising that there is no straightforward and elegant way to schedule periodic tasks without using AE scripting. It seems like there ought to be a way to specify a period when defining an entry in a schedule. If this is possible, I was not able to figure out how to do it.

    Am I overlooking something? Is AE scripting in a time event really the best way to schedule periodic tasks?



  • 2.  RE: Scheduling periodic tasks

    Posted Jul 16, 2023 03:20 AM

    In our system we are using Period objects for all the Workflows or Jobs that have a frequency higher or equal to 30 minutes.




  • 3.  RE: Scheduling periodic tasks

    Posted Jul 17, 2023 03:32 AM
    Edited by Michael A. Lowry Jul 17, 2023 03:32 AM

    Do you use the Execute Recurring function to run these objects with a defined PERIOD, or do you run them another way?



  • 4.  RE: Scheduling periodic tasks

    Posted Jul 17, 2023 10:12 AM

    We use Execute Recurring in the workflow with a Period already created in the system.




  • 5.  RE: Scheduling periodic tasks

    Broadcom Employee
    Posted Jul 17, 2023 03:36 AM

    Another alternative might be calling ACTIVATE_UC_OBJECT by stating a PERIOD object as parameter instead of a start time - nevertheless it involves Automic script and seems to be a sort of combination of Option #2 and #3.



    ------------------------------
    [JobTitle]
    [CompanyName]
    [Country]
    ------------------------------



  • 6.  RE: Scheduling periodic tasks

    Posted Jul 17, 2023 04:06 AM
    Edited by Michael A. Lowry Jul 17, 2023 04:06 AM

    Thanks for the suggestion, @Martin Uferbach. Coincidentally, I had the same idea a few moments ago, just before reading your reply.

    UC4.DB_PERF_MON.SCRI

    :SET &ExecObj#   = "UC4.DB_PERF_MON.MAIN.JOBP"
    :SET &PeriodObj# = "UC4.HOURLY.PERIOD"
    :SET &Queue#     = "UC4"
    :PRINT "Starting object &ExecObj# with period &PeriodObj# in queue &Queue# using ACTIVATE_UC_OBJECT."
    :SET &RunID# = ACTIVATE_UC_OBJECT(&ExecObj#,,,,&PeriodObj#,,&Queue#,,)
    :PRINT "Started task run ID: &RunID#"

    This approach requires inserting an additional wrapper SCRI between the JSCH and the task one actually wishes to execute periodically.

    Why isn't there a Period tab in the Properties sheet for JSCH tasks?



  • 7.  RE: Scheduling periodic tasks

    Posted Jul 18, 2023 04:44 AM

    Good Idea....



    ------------------------------
    Dominic I
    ------------------------------



  • 8.  RE: Scheduling periodic tasks

    Broadcom Employee
    Posted Jul 18, 2023 06:08 AM
    Edited by Martin Uferbach Jul 18, 2023 06:08 AM

    Concept-wise, the PERIOD object was originally introduced as an new object type that keeps a set of parameters for the "Execute recurring"  function in a persistent way so that the parameters can be easily reapplied multiple times without the need of setting them manually again and again. When you perform an "Execute recurring" you can either load recurring parameters by selecting a PERIOD object or just input them manually.

    The JSCH is a concept of its own and we never thought about applying the PERIOD concept to JSCH and/or its entries, afaik. Even the parameters are pretty similar a direct mapping between these two concepts might be hard as is. 

    If you think this might be a useful and beneficial potential enhancement, you could input it as an idea to follow the process.



    ------------------------------
    Product Owner
    Broadcom
    Austria/Vienna
    ------------------------------



  • 9.  RE: Scheduling periodic tasks
    Best Answer

    Posted Jul 18, 2023 07:28 AM
    Edited by Michael A. Lowry Jul 20, 2023 04:09 AM

    I submitted a new idea for this:

    Using PERIODS for JSCH tasks

    If you like the idea, please vote for it.



  • 10.  RE: Scheduling periodic tasks

    Posted Jul 20, 2023 04:09 AM
    Edited by Michael A. Lowry Jul 20, 2023 04:09 AM

    Thanks for the great response: 9 votes in just 2 days.

    Broadcom has previously deleted ideas with fewer than 20 votes, so be sure to cast your vote if you think the idea is a good one.



  • 11.  RE: Scheduling periodic tasks

    Broadcom Employee
    Posted Jul 17, 2023 03:36 AM

    Another alternative might be using ACTIVATE_UC_OBJECT and stating a PERIOD object instead of a start time - nevertheless this involves Automic script and is a sort of combination of Option #2 and #3.



    ------------------------------
    [JobTitle]
    [CompanyName]
    [Country]
    ------------------------------