Callback action before starting timer and after completing timer
701
Views
3
Comments
New
Backend

I'd like to be able to select a action before the scheduler starts a timer, the result of this action would determine wether or not this timer should be started.  Ofcourse this action needs to receive the same kind of inputs the timer would have, most importantly the tenantId and the sskey, so we can fetch the timer to run easily. 

If no action is selected then the scheduler will just start the timer straight away.

It would be nice to have this setting per timer, but also have a default action to fall back to, so all timers can have the same logic to run.

I got this idea by thinking more about a system to let timers wait on other timers, in case of a dependency timers might have on eachother and they run on variable lengths depending on the amount of work that was done on the system that day, you might want some timers to wait for the completion of other timers.

I would also like the same for when a timer finished running, so you could implement the same type of mechanism, but instead of letting other timers wait, you can start them dynamically once the dependant timer has finished running.

Changed the category to
Backend
2016-04-21 20-09-55
J.
 
MVP

Hi,


I am missing the advantage here.

1) you can, although a bit icky, check if timer has been run or not.

2) you can wake a timer in an action

so most of your usecase is already possible.

I agree that it might be handy to have a built-in action if a timer is running, has run..


In my opinion the most gain in this all is to setup a default action for all timers to use.

So you can easily add logging before and after a timer, or whatever action you prefer.

Besides that, yeah, a built in action to see if a timer is running would be nice, which would save me from doing icky stuff. (but that would still require me to manually add an action to every timer).
So it's mostly the default stuff I'm looking for :)