Automic Workload Automation

Expand all | Collapse all

Scheduler starting event multiple times

  • 1.  Scheduler starting event multiple times

    Posted 02-24-2014 07:15 AM

    Hello,

    I am not sure what is happening here but it looks like an event in my scheduler object (v10) is recreated every day and keeps the old event running. I have a simple database event that starts a workflow using ACTIVATE_UC_OBJECT and a scheduler that hosts this event (start time 15.45, turnaround 00:00 each day, 0 concurrent processes).

    After running the scheduler for one week I somehow ended up with 5 active events. I don't think it is supposed to work that way; can anyone tell me what I am doing wrong?

    My scheduler and the event
    b51a6ab9f6c43066a0d4eeb9cac2aa.pnghttps://us.v-cdn.net/5019921/uploads/FileUpload/fa/b51a6ab9f6c43066a0d4eeb9cac2aa.png" width="675">

    The execution/activation of the event

    c8818d6fef667a9f1c26e61676abc5.pnghttps://us.v-cdn.net/5019921/uploads/FileUpload/07/c8818d6fef667a9f1c26e61676abc5.png" width="973">

    Statistics of the last week

    78b8bd8a08ed4f1f4016ffd367d313.pnghttps://us.v-cdn.net/5019921/uploads/FileUpload/6c/78b8bd8a08ed4f1f4016ffd367d313.png" width="1276">

    I don't understand why I see 5 "sleeping" events which start time (according to their running time) is separated by 48 hours each. Also, I don't get why the activities window shows the event was executed every day at the start time and can't give me a status. I think I can fix the behavior by altering the number of concurrent processes to '1' but I want to understand why this happens... Any help is appreciated!

    Regards,

    Jeroen



  • 2.  Scheduler starting event multiple times

    Posted 02-24-2014 11:40 AM
    The green question mark means the object is in an 'Active' status, like Running, Sleeping, or Blocked. 

    Have the Events that are still running met their 'events'? If they are still waiting to be fulfilled, then it makes sense why they are still Active. 

    When you put an Event in a Schedule, it will be kicked off each day, but the previous one will stay running as well unless it's scripted to end at the end of the day or only one occurrence is allowed.



  • 3.  Scheduler starting event multiple times

    Posted 02-25-2014 02:40 AM

    Hi Jennifer,

    Thanks for your reply. I am not sure I understand what you mean by "fulfilled" events; the events check repeatedly every 5 minutes whether the number of records returned by a query is larger than 0. 

    This is actually a process running at our test server so nothing has happened the last week and the event did not occur at all. I updated a record to make the event occur and it was quite interesting to see the process running simultaneously for 5 time - which, of course, failed -.

    Do I understand it right if I should change the number of concurrent processes to 1 for both the event and the workflow started? I figured one event should run eternally in a scheduler but apparently it consists of day to day runs...



  • 4.  Scheduler starting event multiple times

    Posted 02-25-2014 10:32 AM

    Thanks for the additional info. 

    'Fulfilled' means that the parameters set for the event have been met.

    Objects in a schedule are executed every day, so it makes sense why there were multiple Events running if the 'event' never happened. Changing the number of concurrent processes to 1 will be the best way to ensure only 1 Event is running at any given time. 



  • 5.  Scheduler starting event multiple times

    Posted 02-25-2014 02:16 PM
    This is something we've debated here as well.

    We use file events to monitor our SFTP servers for files at 5 minute intervals, and they run indefinitely (as opposed to "until first hit").  For this reason, we do not put them into our scheduler, as we would wind up with a bunch of instances of the events running all at once (and it usually doesn't work well when they all trigger an !event because they're seeing the same file at the same moment).  Even if you set max parallel settings to 1, you'd wind up with either a bunch of events with a status of 'waiting for end of parallel task', or a bunch of cancelled events, depending on whether you went with the 'Wait' or 'Abort' setting.

    So at any rate, this leaves you to execute your events the same way you execute your schedule -- i.e., fire and forget.

    The problem is, what's the best way to ensure that all your events are running?  That is, if you aren't kicking off your event via a schedule, and your event somehow becomes canceled, what's the best way to catch that?
    I suppose you could maintain a variable with a list of all the events that should be active all the time, and you could schedule a script to loop through that list and confirm they're all there, and alert (or just activate them) if they're not...

    Have other people come up with a good approach to ensuring your recurring events stay active?

     



  • 6.  Scheduler starting event multiple times

    Posted 02-26-2014 05:39 AM
    That is an interesting approach but I am hesistant to create a mechanism simular to the scheduler. I thought the scheduler was created for this kind of jobs but it looks like, in this case at least, it is working against you. For now I will just ignore the warning about the aborted event. I am interested in what other users have to say...


  • 7.  Scheduler starting event multiple times

    Posted 02-26-2014 10:48 AM

    We use the following for most continuously executing Events:

    1. Use the Runtime MRT to Curr.date + 1 Day(s) and the Time to 7:55 (for example) for the Event.

    2. Set the Event's Max. Number: to 1 Else Abort.

    3. Place the Event on the Schedule for daily at 8:00 (for example) execution.  In the above example the Event's Check in intervals of: 15 and First check Immediately.

    You would adjust the Runtime and Schedule start to coincide with the Event's interval to ensure that it is executing as appropriate.