Automic Workload Automation

 View Only
Expand all | Collapse all

Schedule job to run every 1 min

  • 1.  Schedule job to run every 1 min

    Posted Nov 12, 2021 06:18 PM
    Hello Team, 

    Problem - 
    We are exploring Automic workload automation (AWA) and we have one requirement where we need to execute job every one minute. 
    Note  - job needs to trigger exact 1 min (means if job is schedule to trigger at 4:30 PM so it needs to trigger in between 4:30:00 PM - 4:30:05 PM ) 

    Solution we tried
    We have tried to use execute recurring and selecting every 1 min option.  but observed that jobs are triggering on every 1 min but observing that jobs are triggering at (04:30:15 PM , 04:31:16 PM or 4:32:18 PM), normally job completes in 40 seconds but some time if it runs for more than 45 seconds then we observing next generation time is impacting.  

    we have selected Generate Task at Runtime so that it will not take much time in gathering attributes values. 

    So is there any way where we can trigger jobs between 4:30:00 PM to 4:30:05 PM. 

    Really appreciate your help... Thank you in advance.



  • 2.  RE: Schedule job to run every 1 min

    Posted Nov 15, 2021 04:49 AM
    You could try something like:

    :WHILE 1=1
    :  Call your function/object
    :  Pause 60
    :ENDWHILE

    or 

    Get the second part of the system time and if it's zero run your job and loop round that in stead

    ------------------------------
    Mick Moses
    Software Configuration Analyst
    Lowell Financial Services
    UK
    ------------------------------



  • 3.  RE: Schedule job to run every 1 min

    Posted Nov 15, 2021 04:53 PM

    Just on principle, using AWA to kick off something that runs this frequently is a bad idea.  AWA was never intended for that type of thing.

    It is still an interesting problem though.  I've experimented with wrapping the task inside of a workflow and the last task schedules the next invocation to run at a specific time in the future.  But this doesn't work because AWA keeps track of parent-child relationships and after it goes 17 or so deep in tracking these relationships, it stops cold to protect you from undesirable infinite loops.

    The problem with using an AWA script loop is that AWA presumes after a certain amount of looping that you are stuck in an undesirable loop, and it will force the script to pause periodically so that it won't consume all of AWA resources.

    I suppose you could run a script once a day (or once an hour?) that pre-scheduled all of the desired runs for the day(?)

    In reality though, something that runs for 40 seconds every minute really should be solved outside of AWA, like as a standalone service on a different server, or something like that.



    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 4.  RE: Schedule job to run every 1 min

    Posted Nov 16, 2021 08:32 AM
    Question is why every 1 minute?  Many times that is set at a level that may not have been thought out.  How about, run and when complete, run again.  Repeat for 5 minutes?  Another is to have a sql event. Select 'x' from .... where conditions meet.  When met, run bang process.  keep running until other condition is met.  I find that when I push back on the request, I get more information as to the why of the request and can offer a better solution then what they are asking for.

    ------------------------------
    Cheers,

    Gary Chismar
    Manager, Automic, PeopleSoft HCM/FI
    Florida State University
    Florida
    ------------------------------



  • 5.  RE: Schedule job to run every 1 min

    Posted Nov 16, 2021 06:11 PM
    Hi Gary, 

    We have a scenario where an external application sends a file every one minute, so we need to schedule a job to read data from that file and load it in the table. all these needs to complete within 1 min so the next generation will be ready.  

    Also that external system starts copying the data for next min (e.g. to execute a job on 05:05 PM , file generation starts at 05:04:10 seconds) so we have dependency to start every min job before 10 second mark, as during testing we have observed that job didn't trigger for as it observed multiple files.

    Also we have scheduled 1 min applications for checking listener and logger availability for ETL systems which are used for data replication in our system.

    so I feel that sql statements are not very useful here. 

    Also, I would like to know how you have scheduled back to back schedules like as soon as first completes trigger another without any delay. 

    Regards,
    Amey Deshpande


        





  • 6.  RE: Schedule job to run every 1 min

    Posted Nov 16, 2021 06:38 PM

    To schedule an object to run back-to-back one can go to that objects Attributes/RuntimeParameters and change the "Allow # simultaneous executions" value to "1".  You can then execute as many of them as you wish and they will automatically single-thread their executions.

    Another option is to dedicate a QUEUE for them to run in that only allows one at a time.

    I'm also concerned about the possibility that you could try to consume an incoming file before its transfer is fully completed. 



    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 7.  RE: Schedule job to run every 1 min

    Posted Nov 16, 2021 06:39 PM
    An event driven design would be better.  The external system copies the file, and when done copying, it then uses the Automic RESTAPI to kick off the desired task.

    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 8.  RE: Schedule job to run every 1 min

    Posted Nov 16, 2021 06:44 PM
    We have an application that deals with a variable number of incoming files, but on a 6 hour cycle.  Once every 6 hours we run an Automic workflow that checks the incoming folder for files that need to be consumed, and it kicks off the appropriate number of tasks.

    I don't know if that would fulfill all of your requirements though.

    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 9.  RE: Schedule job to run every 1 min

    Posted Nov 17, 2021 02:11 PM
    Hi Pete,

    But in Event based things if the job completed at min:30 Second and the file will be available then it will trigger the execution.

    Regards,
    Amey Deshpande

     







  • 10.  RE: Schedule job to run every 1 min

    Posted Nov 17, 2021 12:19 PM
    Hi Pete,

    will this option trigger job back to back without any delay. as my understanding was "Allow # simultaneous executions" value 1 means at a given time only 1  execution is allowed. but when I uses execute recurring option observed that I can not set value as 0 Min 0 Sec

    Regards,
    Amey Deshpande  



  • 11.  RE: Schedule job to run every 1 min

    Posted Nov 17, 2021 02:10 PM
    "Schedule job to run every 1 min"
    OPINION: Automic can not and should not be expected to do this with the precision you are asking for.

    As Gary Chismar suggested, you should push back and demand they soften the requirements. We have several systems here where we pushed back and the application designers agreed that once-every-15-minutes would be reasonable for everyone.  Hopefully you could reach a similar agreement.

    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 12.  RE: Schedule job to run every 1 min

    Posted Dec 01, 2021 09:43 PM
    Hi
    I do agree with Pete that Automic is not designed as a real time scheduler. It is a very good batch job scheduler.
    In early days, we did put 1 min job into UC4 (then), it resulted in performance issues as the logs, statistics and resources consumed by the 1 min job was enormous.  Since then, we have standardised to minimum 1 hour for repeated jobs (can compromise e.g. 15 mins interval during office hour).  To handle the 1 min requirement from application, the 1 min is automated at the target system instead (e.g. SAP scheduler or Windows scheduler) and if programmers are concerned that no one is monitoring these 1 min job, then use Automic to run same job every e.g. 15 mins - any data/pgm issues will be flagged for attention.

    ------------------------------
    Mdm Soon Jong LIM
    Manager
    SP GROUP
    Singapore
    ------------------------------